Locked public restrooms are an easy-to-spot sign that a municipality is suffering from an underinvestment in public infrastructure. If a city doesn't maintain public restrooms it's likely that other essential services are suffering from a similar lack of attention.
From David Perell's Monday Musings newsletter:
Testing the Social Health of a City
I use a heuristic to judge the social health of cities I explore.
Among my favorites is the quality of public bathrooms. Only a select number of cities have free and clean public bathrooms (Tokyo comes to mind). Many cities require you to pay a small fee to use the toilet, which isn't an issue if they're clean.
But closed restrooms are the ultimate sign of urban decay. They imply that a city can't trust people to use them responsibly and that society has fallen to the tragedy of the commons.
Locked bathrooms also reveal a decaying culture because they wouldn't have originally been built if urban planners thought nobody would use them