When we send satellite into space using a rocket, logically we consider the shortest path which is a straight line perpendicular to Earth's surface. My question is do rocket takes the shortest path to reach outer space or stray off intentionally at an angle from Earth's surface?
It sounds like you are imagining that what satellites do is go up through the atmosphere, break through into outer space, and hang there. That is not right. If you simply go straight up to outer space (say 300 km above Earth's surface), gravity will pull you right back down, even if you've left the atmosphere, and you'll crash back into the Earth. Gravity is only about 10% weaker at 300km (which is well above the bulk of the atmosphere) than it is on the surface of the Earth
Satellites are not only ~300 km above the surface of the Earth, they are also orbiting. For a low-Earth orbit, satellites need to travel some 7,000 meters/sec horizontally (17,000 mph) in order to orbit.
Because getting to an orbit is a combination of getting through the atmosphere, getting up to the desired height, and getting the desired orbital velocity, (all while their mass is changing because they carry their fuel with them) rockets do not simply go straight up. Early on in a satellite launch, rockets usually go roughly straight up because the atmosphere is thick near the surface of the Earth and they're trying to get through it as quickly as possible. Later on, rockets tilt over and perform a combination of horizontal and vertical motion as they reach their orbit. The optimal path is a combination of avoiding drag and mixing height and orbital velocity together appropriately.
This is also why most satellites orbit in the same direction the Earth spins; by orbiting that way, they get a bit of free sideways velocity from Earth's rotation during launch.
Typically the goal of a satellite is to orbit, and thus as the other answers address, you must build significant horizontal velocity. Indeed if the Earth didn't have an atmosphere, you could orbit a few km above the surface, so the main goal is building enough orbital (horizontal) velocity somewhat above the dense regions of the atmosphere.
If you only burned vertically with respect to the Earth, you will follow a trajectory similar to the one below:
I did want to add why you might WANT to travel 'vertically' only:
- Your goal is to smash into something that is in orbit; you just want to reach a desired altitude at a given time (say, to destroy a satellite or an orbiting alien craft)
- You want to crash land back on earth, say for Kinetic Bombardment ("Rods from The Gods")
- You want to smash into other celestial bodies. In theory, the lowest energy trajectory to lunar bombardment is to launch 'straight up' at the right time to just beyond the Earth-Moon L1 Lagrange Point.
To get to the moon (well, smash into or flyby the moon), for example, you could 'launch straight up' and follow a trajectory like the one below. Note that you will have some horizontal velocity if you 'launch straight up', as you will inherit the rotational velocity at the surface depending on your launch site's latitude (~500 m/s at the equator, 0 m/s at the poles).
In the above scenario, I was a bit late on the launch timing and thus trailed behind the Mun (in game 'Moon'). The purple post-encounter trajectory would have landed me back onto the surface of the planet, with no stable orbit established, and launched from the equivalent of the equator.
Bottom line is, if you want to orbit, you need horizontal and (and initially some vertical) velocity with respect to the surface. You can save a bit of fuel if you just want to 'get there' (and then smash into something).
Rockets take the shortest path to reach their orbit.
If all we want to do is pop up to LEO and come back down again, then we do go straight up. See the first two Mercury missions for an example - they landed north of Nassau.
If you want to end up in orbit, you need substantial horizontal speed. Turning at right angles is the least fuel-efficient way to do this, so the launch trajectory is a complex function of where you are now compared to where you want to be, and "where" includes velocity and direction, not just position.
I'm sure this is an incomplete answer, and would only add to those already excellent, more knowledgeable answers, but I do know that rocket scientists try to situate their launch site as close to the equator as they can, so the Earth's diameter gives some extra "throw" as compared to higher latitudes. I expect when the rocket tilts toward the horizontal, it is leaning in the direction of the Earth's rotation, so it can simply accelerate the motion it already has.
some more explanation, because I love to explain: That's one reason why the United States' facility is at Cape Canaveral, almost the southernmost point in the continental United States. You could liken it to those tennis ball throwers dog owners use --the longer the stick (the distance from the center of the Earth), the more velocity you get. If denser atmosphere slows down a rocket, the ideal launch site might be on a mountain in Colombia. Unfortunately the logistics to launch any sizable satellite from there would be prohibitive.