Because it works (despite the advertiser's whining), and provides a service that otherwise wouldn't exist.
It's funny; I've lived in both Paris and Seattle, two cities which have the expensive and difficult-to-maintain electronic public toilets which automatically clean themselves after every use. The ones in Paris are run by JCDecaux (same company who is doing the bike rentals), and although they are dreadful to use, they work (and have worked) for years.
In Seattle, the city was approached by JCDecaux to build public toilets in exchange for putting advertising near them, but were refused. Seattle decided instead to use millions of taxpayer dollars to form their own ad-free version. The toilets rarely worked (and in any case were constantly occupied by crackheads). 2 or 3 years later, the city cut their losses and unsuccessfully tried to sell the toilets on eBay.