My uncle moved to SF in the early 2000s and died in May 2020 on Eddy St. Even before he became "homeless" he just did drugs all day and thought the world owed him something. He had a college degree and everything, worked white collar jobs, but decided he liked heroin more than that stuff, so he moved to the Tenderloin. Lack of housing wasn't part of the equation, it was the lifestyle that drew him.