Having just spent the year in Manhattan, my experience was that most (every?) Starbucks there no longer have public bathrooms even with purchase. I was surprised to discover that the only free public bathrooms were at Sweet Green. It changed my perspective of them as a company- it’s a real commitment when the trend is going in the other direction and I want to support them financially as a result.
Yes, I figured out the Starbucks (or any other fast food chain) thing after staying there for a while. It's however really a sad scene where people deny visiting washrooms especially when you need it the most.
Plus it paints a wrong picture of a country because it's technically people asking you a few bucks for a basic necessity and the government has failed.
This is in stark contrast with developed countries like Singapore (where I visit a lot). Singapore makes sure a public toilet is available within a few hundred meters and boy are those clean!