Agree with you. It's a truly sad state that libraries have become the de-facto "last option" for so many people, ranging from Internet access for those too poor to afford a basic phone data plan over food [1] and
showers [2] to first aid for drug users [3].
Out of all of that, only the first should be provided by a library - the rest should be a core function of any civilized government to provide in dedicated, actually properly equipped facilities. Librarians are not social workers, and they shouldn't have to be forced into that role that they've never been adequately trained nor equipped for. And libraries shouldn't be places where those in need of their actual services are afraid to go to, because they don't want to get harassed by homeless and drug users.
And yet, I shudder even thinking about how the situation would look like if the many librarians and other adjacent staff would not have stepped up to the multiple crises of completely dysfunctional local governments and widespread poverty.
[1] https://www.governing.com/now/public-libraries-step-up-to-he...
[2] https://www.slocounty.ca.gov/Departments/Library/Library-New...
[3] https://www.cbsnews.com/news/libraries-becoming-popular-plac...