Giant impacts stochastically change the internal pressures of terrestrial planets