Libraries are a valuable resource to the homeless and those who have nowhere else to go. If such people are respectful and treat the library as a library, then nobody will begrudge them an hour's nap or their refuge from midday heat while they read books or use a computer. Homeless people can even sign up for library cards and use them,
almost as if they were real patrons.
Of course it becomes known that a library doesn't mind the patronage of the homeless and disenfranchised, then people begin to abuse the hospitality. People try to shower and shave and brush their teeth in the restrooms. People drag in half a shopping cart's worth of bags and personal belongings, and camp out with a pillow and blanket. People deface or steal books, DVDs, and other materials. People have mental health crises in front of the other staff and patrons. Of course these disruptions are not the sole purview of the homeless.
But they cause security to be tightened, and big signs that prohibit lots of stuff are posted, and the collection dwindles to whatever nobody wanted to steal. Man, I've really felt the pinch there. COVID-19 did libraries a favor in this regard, because they had a plausible excuse to flush anyone and everyone out of the building and off the premises, and do a great reset of the whole situation.