Originally Posted by
Efrem
If you'll need a passport to enter your destination country, they shouldn't let you on the plane without one. Among other things, the airline will be required to fly you back at their expense. It's a hassle for all concerned.
you seem to have misunderstood - OP is talking about exit immigration (the Spanish border police in this case), not the airline. The airline has an interest in making sure OP can enter the destination country. Spanish border police do not, but as OP discovered, they are quite flexible with the rules. OP is exactly right that an EU national ID is perfectly valid for both entering and exiting. The airline’s passport check is completely separate to that.