Some perspective from a Spaniard:
The Spanish taxi guild/lobby is very, very strong. Spain has a strong public transit system, but taxis are widely used nevertheless.
Taxi drivers went on strike this year during specific dates and all hell broke loose. They have much to lose, since a taxi license is very expensive and considered an investment, there is a second hand license market, etc. Some people buy houses, they buy taxi licenses. It is a heavily regulated market, since free competition would draw prices to a point so low that the business is not profitable (or so they say)
On one hand, I've never seen a rich taxi driver. I'd argue it's a low/mid-level job for low/middle class people who have nothing else to do. Similar to construction workers; if they lose their job they cannot work as anything else.
On the other hand, I'm pro-competition, but I respect regulated markets for some areas (healthcare, transportation, telecommunications, energy, etc). So why not taxis? I'm just not knowledgeable enough to make a strong point for or against taxi drivers.
While Spain is known for its political corruption, courts of law have been pretty professional and their rulings are usually fair and law-compliant. So if a court has banned Uber, it's because the Spanish law protects taxi drivers. It's a political matter.
In summary, devaluing or voiding taxi licenses would leave tens of thousands of people in debt, probably without a job, and with nothing else to work of. Yes, I know that if it were for ice drivers, we would never have had electric fridges, but I can also sympathize. It's basically a matter of jobs. The Spanish government doesn't want our 30% unemployement to be any higher, taxis to be on strike and in general people to be angrier.
TL;DR: Spain is a heavily regulated country and the EU directives also point to that direction. Taxi drivers are a low-mid demographic which need protection or, at least, protection from a total disruption of their jobs from new agents like Uber. Yes, this is bad for free competition, but this is Europe, and the level of legal protection is like this: workers > consumers > companies.