I don't know for sure but I suspect it's probably perfectly legal. I'm not even sure the the European Commission will have any objections either, airports are run as a business and they compete with each other on that basis so it could be argued that if one airport decides to levy an extra charge for it's services then this is a business decision and it is for the customer to choose whether or not to use their services.
The interesting point would be the obligations of the carrier and if they have to make you aware of such a charge. Many airports around the world levy an 'Exit Tax' and I've never been made aware of this in advance by the carrier, if you don't pay then you can't use the airport.