Is there any reason that Musk couldn't colocate SpaceX and Tesla in Freemont instead of SpaceX being located in Hawthorne? What's the benefit of SpaceX being in the LA area?
Los Angeles has a very large aerospace industry and long history in it. Northrop Grumman, Boeing, Lockheed Martin, Raytheon, and SpaceX all have a large presence in Los Angeles's South Bay. It's not as large as it was during the "cold war" but a lot of skilled employees still live in the area.
Also, that part of LA (hawthorne, el segundo), has a history of aviation and rocketry companies, so it has better facilities and a larger built-in talent pool too.
They do co-locate some operations (tesla designer lives in the SpaceX office, not the tesla office), but it makes sense for Tesla, as a consumer brand, to be located in the most densely concentrated location of multimillionaires and billionaires in the world.
Los Angeles in general is pretty supportive of aviation. Not just adjacent to LAX, where you'll find SpaceX and Raytheon, but throughout the North from Pasadena into the West valley.
The trend has been decreasing for a long time, but amazingly there are still a lot of activity in aerospace. Most of the big names have left and their campuses turned into shopping malls, but there are still a lot of small specialty shops working on prototype parts.