The vulnerability to this kind of exploitation takes a different from than the emergency room. The Internet, search engines, Google, and so on created a kind of identity crisis in the library world, partially stemming from the people who think that they're going to learn with any depth from a quick search, but also self-inflicted, "Who are we in a 'digital age'?" sort of wailing. And so libraries are forever giving away their lunch money hoping that someone will be their friend, stick up for them, validate their existence. This is especially true at the academic level.
Interesting, too, that one of the other big societal institutions open to all comers, the churches, have largely dwindled.
Churches (at least in the US) haven't been open to all for many decades now, they're highly exclusive places. Yes, technically anyone can usually walk through the door on a Sunday morning for free, but other than that literal hour, Churches usually have a lot of restrictions before a person is allowed to meaningfully participate in any way (restrictions on income, location, wealth, lifestyle, etc)
US Christian Churches are basically political country clubs pretending to be non-profits by way of their religious veneer. I would argue they're almost the complete opposite of a Public Library or Emergency Room.
Some or most of them probably do operate like you say but I don't think it's evenly distributed because I never ran into that in cities. Usually if they didn't want to provide services they were just closed except during worship hours. But evangelical megachurches are underrepresented in urban cores compared to their national presence, which may play a role in my experiences.
There are plenty of churches where looking after the less-fortunate is still a serious priority. Unfortunately, there are no "Faux Xian" disclaimers posted on the doors of the other sort of church.