It's generally more expensive to buy/rent a smaller place in a metro area near the office and commute there than it is to buy/rent a place with a home office in a more reasonably priced area.
When all expenses are considered, working in-office can (and often does) cost the employee way more money than remote.