Many public libraries in California do struggle with homeless patrons. Librarians serving those libraries are sometimes required to take specific trainings to be able to provide help for the less amicable homeless crowd, and some are even equipped with narcans for emergencies.
The problem of homeless who reject housing, reject care for serious mental health conditions, or have uncontrolled substance abuse issues cannot be solved by the unconditional provision of hotel rooms or tiny homes. Those who fit these categories make up the bulk of the chronically homeless. They also create the majority of safety and health hazards for those around them.
They tend to avoid shelters because of rules against drug and alcohol abuse, favoring instead tents or public transport such as Palo Alto's "Hotel 22" bus route:
The carrot-and-stick model works pretty well as most regions that adopt it: You fund/build enough housing and public programming to get enough of the unhoused into shelters/homes (carrot) and then ban public camping and street sleeping (stick).
Most cities rule out the stick unless the carrot is provided, which is correct. But a significant number of those on the side of handing out carrots don't want to tie it to the stick.
So homelessness is rampant and everyone is unhappy. Perfect.
There is approximately no headroom between California's population and its actual + buildable living space. The idea that homeless people are going to beat Fortune 100 executives and literal billionaires for access to the scraps that remain in our zoning maps and after discretionary reviews, CEQA, etc. is more of an "after the revolution" daydream than a serious policy proposal.
Policies around behavior in public spaces are actual live debates.