They're a magnet for the anti-socials, either drug dealing/taking, sex, homeless drinkers, teen vandals, etc.
Police can't be arsed to actually "police" so the council picks up the bill for the damage/cleaning, which is often excessive. Hence why the councils have closed them down and demolished them.
But lots of other places have "Public" toilets, such as hospitals, libraries, supermarkets, chain store shops, fast food outlets, chain hotels, shopping centres, car parks, leisure centres, rail/bus stations, even town halls, court buildings, etc - basically mostly places that can be locked up at night when the anti-social behaviour tends to happen.