The headquarters aren't always that important.
Exactly. Headquarters is where you have the bulk of your accounting, marketing, legal, HR, finance, real estate, and the like. Not to devalue them, but many people with those skills can be found in sufficient quantity in any major metropolitan area. It makes no sense to locate such employees in high-cost areas such as the Bay Area when there are plenty of capable employees in low-cost areas. In HPE's case in particular Houston already hosts their largest operational site and HPE's needed to replace their regularly flooded facility for a while now.
Now, something like engineering and R&D is more of a mixed bag. There are several aspects to this.
First, a concentrated amount of such talent wants to be located somewhere like the Bay Area or Seattle, and can just as easily work for many other companies located there. If you want to tap into that pool you have to have a presence there. It doesn't have to be your headquarters, it doesn't even have to be the majority of engineering/R&D, but you need something substantial.
Second, due to network effects and the fact that sometimes locality and face-to-face does matter, you need people in proximity to the partner companies you work with. In HPE's case processor, memory, and storage manufacturers have headquarters or heavy R&D presence in the Bay Area, and many of their important data center customers also happen to have a heavy presence there.
Finally, on the other side of this, there's lots of talented engineering/R&D people who don't particularly want to live in the Bay Area. They're much more dispersed geographically, often in pockets of specialties. In order to snag them you need smaller sites all over the place. Plus there are some pretty incredible people that are perfectly happy to work from anywhere they can get a solid Internet connection. Thankfully COVID-19 has made it perfectly clear that they can be (not necessarily are, but can be) just as productive at home as anyone in an office.
So yeah, headquarters location isn't always all that important for many companies. If you were in the finance and banking business you probably need almost all your operations and executives in some place like New York, London, or Hong Kong, and your headquarters probably needs to follow. If you manufacture water treatment plant equipment, it probably makes no difference at all where your headquarters is as your customers are everywhere and the talent you need isn't concentrated in any one place. Somewhere in the middle are many other mid-sized to large companies -- there are centers of importance, but not necessarily for HQ type functions.