You can't build a society where even a middle class, decent paying, job can consign you to a homeless shelter. Not everyone can write code. Nor should they. But if nurses and cops can't live in town, they aren't going to want to work there. Especially when a rent hike could leave them nomads on the 22.
Balance is the law of nature.
When one element becomes too strong, it throws the entire ecosystem out of wack. As the number of people who have a stake in the community diminishes, and the number of people who actively resent it grows, you risk social explosion. The good times need to be good for everyone. You can't have tech millionaires living in splendid isolation while you make working people with decent jobs, as homeless as a runaway crack fiend on Sunset Strip. Companies can at least help build housing for their workers.