More importantly, the HQ is built in California, which despite appearances isn't a capitalist dystopia but a local government dystopia.
Any random local government staffer is the most powerful person in the universe and obeying them is a religious edict. Apple has zero power to disobey anything in the fire code and they're probably not even capable of imagining doing so. That's why the random suburb they're in has the best public schools in the country and all the houses are like $5 million.
As an example there's currently a big empty lot next to said HQ where the mall used to be, because a random woman on the city council has blocked apartment construction for the last decade, because she thinks Apple employees will move in and molest local high school students.