SpaceX and Tesla cannot move with the ease of software companies due to the facilities and equipment needed to build, test (and in SpaceX's case, launch & land) their vehicles.
???? You can keep factories open in other places and relocate corporate staff comparatively easily. Not to mention you can also build new factories and facilities close to the new HQ once the move happens.