There's a book that tries to explain why Seattle is Seattle, and ABQ is ABQ: The New Geography of Jobs
The author makes a good point that well educated or highly motivated tech workers have a lot of mobility. And if those workers want to work in a specific technology area, they tend to move to where the notable clusters of that work are. (Software in Seattle or Boston, Space in CA or CO, et cetera.)
Plus in NM's case, we see that when a company shuts its doors here or if there is a recession, people looking for tech work (since SNL and KAFB can't hire everyone) end up having to leave. There's just not a whole lot here compared to Austin, Phoenix or Denver. (I am an engineer who moved here, BTW.)
Then again, maybe that's a selling point to certain people (like me): "Albuquerque: It's not Austin or Phoenix or Denver."
> I don't even get why a company would locate themselves there
One explanation I've gleaned from this book: because the majority of the tech industry operates there, so does the majority of its labor force, including those looking for work (where better to expose yourself to all those tech firms?). By situating in the Bay Area, new firms as well as existing ones looking to scale up are in the best position to a.) find best possible hires and b.) continue finding best possible hires. The internet has not countered this dynamic to the degree we would have expected.
Jobs get outsourced to lower-cost countries, but only those jobs that make sense.
The more that jobs require strong social capital and access to near-the-edge technology, the harder it is to simply outsource that away.
Things like IT/Operations, network administration, tech support, and some level of web and mobile development, sure they can be outsourced.
Work that is related to R&D, high-value products/services or mission-critical development, that is extremely difficult to outsource.
In fact, if you look at remote jobs of that type, you'll see that they'll let you work from anywhere, as long as you work at the HQ's office hours (because of the need for tightly coupled collaboration and research.)
This is a very complex topic, and yet it is one superbly discussed Enrico Moretti's "The New Geography of Jobs." It is a book I strongly recommend people of all professions to read.
https://www.amazon.com/dp/B008035HQQ/ref=dp-kindle-redirect?\_encoding=UTF8&btkr=1