The reason is related to our orbit. Why do rockets never take off straight up? It is because it is necessary for them to curve their trajectory as soon as they can. This momentum will vary between bodies with a dense atmosphere, such as the Earth, and bodies without an atmosphere, such as the Moon. So it can reach orbit in the most efficient way possible.
Atmospheres
It is not only necessary to reach the correct altitude for such an orbit. It is also important to reach the right velocity. What if a rocket took off perfectly upward and never banked its trajectory? It would continue to climb as long as it conserved fuel, until it would stop and fall back down. But by describing a circular orbit it doesn’t need to consume a gram of fuel to stay there. The orbital velocity ensures that it does not fall back to earth.
What if, after a vertical trajectory, it wanted to reach an orbit at that same altitude? It could not do so by simply turning around and starting the engines. It would begin to describe an elliptical orbit that would get higher and higher. That’s why it starts the maneuver shortly after takeoff. A gravity-assisted spin of the object around which the spacecraft intends to orbit is used.
On a planet with a dense atmosphere, such as Earth or Venus, the initial vertical takeoff phase will be somewhat longer. That is the most aerodynamic position for the rocket. If it were to tilt too much while in the low, dense layers of the atmosphere, the friction with the atmosphere could grow too much. It would end up destabilizing the rocket. On bodies with no atmosphere or a thinner atmosphere, such as Mars, this maneuver will take as little time as possible.
Up and forward
Thus, to move to a higher orbit, a rocket accelerates forward, rather than “upward,” toward the direction that takes it away from the planet. As it accelerates, it exceeds the optimal orbital velocity for that particular altitude. The result will be a larger elliptical orbit than the original.
If the rocket were to point straight upward while in the original orbit, it would succeed in increasing its altitude. But it would not change its orbital velocity. The result of this would simply be to shift the original orbit by several kilometers. That is why rockets never take off directly upward.