Have you lived in Toronto? Houses in the city average over 1M CAD and there are tons of vagrants on the street.
As for people living on the street. According to wikipedia the estimated homeless population in San Fransisco is between 7000 and 10000. The estimated number in Toronto is 5,253 (source: Toronto.ca), but since Toronto has 3.5 times the population, this means that the homeless population is at least 5 times bigger.
Compare SF bay area to Toronto would be more fair.
In the Netherlands (where I come from) the average saleries for programmers are even lower, but in return you get a pretty great social system and a much saner work/life balance.