Why are you comparing it to building expensive modern hospitals? Why don't you compare every other tech acquisition to that? because that's not a relevant comparison, and building expensive modern hospitals has nothing to do with the goal of for-profit corporations.
SpaceX has 3 major businesses: Space, Starlink, and AI.
This acquisition helps with the 3rd one.