One thing to keep in mind when comparing homelessness in Berlin and SF is the clima. I don't know how much it contributes but homeless people in Berlin risk to freeze to dead. So I could imaging homeless people prefering warmer cities.
If someone becomes homeless in a place where homelessness has a significantly increased risk of death (such as freezing to death in Berlin), then either they move away, they engage with local support services, or they carry on as they are, risking death (and some of them will die as a result). Either way, the effect is a reduction in the number of homeless people at that location.
Thankfully a lot of places recognise some of the risks and try to address them. In the UK, many cities have a cold-weather response: when the temperature drops below Xº, additional shelters are opened, and street-teams look for people sleeping rough and guide them towards the shelters.