So how moral is the behavior of the companies building/renting offices there, knowing in advance that housing is unaffordable? Only because their investors live nearby?
Instead of talking about morality I think it’s best talk about incentives and try
to determine what incentives ought to be in place in order to achieve a desired outcome. For whatever reason, it is the case that building high density housing is not allowed in many locations and the accompanying expense of that is unsustainable. I use “expense” to encompass financial, economic, societal, and environmental costs.