planetary atmospheres

why don’t planets lose their atmospheres to outer space? one would assume that the Boltzmann distribution would always allow a certain fraction of molecules to have kinetic energies large enough to overcome the gravitational potential. bonus question: wouldn’t the same thing apply to other gravitationally bound equilibrated systems such as open clusters, globular clusters and galaxies?