It is the same in France, but it is not something that is common in Spain except in some large cities (Pamplona and Leon come to mind).
I have opined before in the Forum that Juntas could subsidize portable toilets at strategic places that also would be catering trucks. Each morning in the high season, the vendors and toilets could position in the sections without bars or restaurants, and then return in the afternoon to a central point in the city for the toilets to be serviced. With a nominal charge for the toilet, twenty cents perhaps, vendors would be able to make a profit, Spain would add a few hundred seasonal jobs to reduce its high unemployment, the subsidy from the Junta would be nominal, and the countryside would be cleaned up a bit.
Imagine vendor trucks with a portable toilet in tow that would be a bit like the
donativo squatter before the cross before Astorga (but with the electricity, hot water, and sanitary facilities that he lacks).
It is my suspicion that bars actually want to draw in pilgrims with their restrooms, but only if they sell something. There is not a big markup on an 80 cent
cafe or 1.20E soda, so buying something in a bar is not a huge benefit to the owner in maintaining the toilets. It is closer to a courtesy than it is to a capitalist windfall.
The vending trucks would be the same, but not in the villages and cities with commercial establishments. As long as the bars did not see the toilets as commercial competition, I think they would support the juntas' program. It is pretty obvious to anyone who walks the Camino that the need for a toilet is not limited to the villages and cities!!
I fully expect my idea to never be implemented...