Offices also have to be good enough to warrant having to travel hours each day to get to/from them, which is a pretty tough to compete with for a lot of people
To put an even finer point on this: no matter how good your office is, if your office is in the middle of a huge metropolis then you are now asking people to either do long commutes or make some honestly hefty sacrifices in living arrangements to be close.
No amount of office niceness can compensate for the surrounding area to be not a place you want to live in.
I think it’s a huge missed opportunity for smaller startups to not place their offices in areas a bit off the beaten path. SF is uniquely weird about this from what I understand, but like NYC or Tokyo is filled with startups putting their office in places where workers either have an hour commute or have to increase rent by a lot to live closely. All for, frankly, the status of the address. Then companies whine about high salaries and nobody wanting to come or Mori tower.
Meanwhile there are many neighborhoods that are cheaper, have near equivalent services, and could offer a nice environment where people want to live closely. Commercial real estate is not always available, but the rent savings alone could easily pay for a lot of renovations to another building
if you want to attract the best talent and have an in-person culture, you kinda have to place offices in central locations, which inevitably become very expensive.
take NYC for example. office space in manhattan is extremely expensive, but it's also very well connected. people can reasonably commute from four out of the five buroughs, and a bit less reasonably from NJ, the lower hudson valley, etc. pretty much anywhere else in the greater NYC area would be much cheaper to rent office space, but the subway and commuter rail are all designed around the expectation that people need to be moved en masse to/from manhattan. an office in queens would be attractive to people who live in queens, but it would exclude people who want to live in all those other places.
that said, some companies do exactly what you suggest. amazon has a lot of offices in less "desirable" areas. HQ2 is a prominent example. crystal city is far from the most prestigious place to have an office in the DC area, and it's not particularly well connected to most neighborhoods in DC proper. but if you're okay with living in alexandria or arlington, you can have a decent commute and save a bit of money on housing.
there are also a lot of smaller tech companies that set up in random suburban office parks. typically they do this because they are more focused on reliable profits (and lowering costs) than rapid growth. these places can honestly be pretty nice to work at, but you need to really adjust your expectations around comp. you don't hear about these places because they've essentially decided not to be competitive.
The reason I take jobs in a centralized dense downtown is because I know I can find another job without changing my commute. It also makes socializing after work, or during work, so much easier. I've worked in 5 different offices within a mile if each other in the last decade. I can still grab lunch with people I used to work with within a 10 minute walk of my current office. It is the only reason I am happy to go into the office a couple times a week.
If I worked in a generic office building in the suburbs I would never want to go in.
No amount of office niceness can compensate for the surrounding area to be not a place you want to live in.
I think it’s a huge missed opportunity for smaller startups to not place their offices in areas a bit off the beaten path. SF is uniquely weird about this from what I understand, but like NYC or Tokyo is filled with startups putting their office in places where workers either have an hour commute or have to increase rent by a lot to live closely. All for, frankly, the status of the address. Then companies whine about high salaries and nobody wanting to come or Mori tower.
Meanwhile there are many neighborhoods that are cheaper, have near equivalent services, and could offer a nice environment where people want to live closely. Commercial real estate is not always available, but the rent savings alone could easily pay for a lot of renovations to another building