Why doesn't the vacuum of space rip the Earth, or other celestial bodies, like the Sun, apart? Since vacuums are a lower pressure than the atmosphere of the earth(and probably many or all other planets) then why doesn't the vacuum of space rip the earth apart or suck all the gasses on it away and distribute them around the universe?   
My theory is that it's because earths gravity is strong enough to hold all of the gasses and other particles in.
 A: Yes, it's gravity that holds planets and other celestial bodies together. In particular, a solid object on a planet would have to be moving faster than the planet's escape velocity in order to overcome the planet's gravity and go off into space. The Earth's escape velocity, in particular, is about 40,000 km/hour (that's about 25,000 MPH if you're from the U.S.), so essentially no solid objects on Earth move that fast naturally.
However, gasses on a planet do drift off into outer space, which is called atmospheric escape. The most common mechanism for that happening is called Jeans escape. In a gas like the atmosphere, the gas molecules move at a range of different speeds, called the Maxwell-Boltzmann distribution. At any given temperature, most of the gas molecules are moving fairly slowly, but a few of the molecules wind up moving so fast that they're faster than the escape velocity, and the gas molecule goes off into space.
The Sun and other stars have an atmosphere that's much hotter than a planet's atmosphere, which makes it even more likely that a particle will wind up going faster than the star's escape velocity. The particles that escape from the sun like that are called the solar wind.
A: Because it's not a perfect absolute zero vacuum.
