Just like in running, athletes gain power through the rotation of the torso, shoulders, and hips. Engaging your core, chest, and back muscles help transfer power from one side to another and, along with your kick, make up the fundamentals of swimming propulsion.
However the rotation plays a bigger role in swimming than just forming the basis of propelling yourself through the water. There are a few important reasons (among others):
1) It allows for easier stroke recovery. When swimming flat with no rotation, you would need to pick your arm up higher to clear the water for the next stroke. When you've rotated to your side, you will naturally have more space to clear the water.
2) It eliminates (at least to a certain degree) cross-stroking. When you reach across your body instead of swimming with each arm out in front of you, you take away efficiency gains from your stroke and in effect are stopping your own momentum by getting in your own way.
3) Further to the above point, by rotating to your side and having your arm in front of you, it's easier to glide through the water as you are in an aerodynamic position.
4) It extends your stroke. By rotating and extending, you are reaching farther forward and gaining more "ground" with each stroke. It effectively eliminates strokes from your swim, giving you a more efficient result.
Take a moment to compare the strokes in the Instagram video and watch the glide and speed from the swimmer on the right.
This style of swimming originates at the hips and drives through the shoulders, arms, and fingertips. Try having a friend film you, underwater if possible, and look for ways to improve your stroke.
A note on kicking too: Both the video and the image with this post demonstrate that the legs drift sideways along with the upper body rotation. It's a natural, fluttering, drifting state for them to be in while maintaining their rhythm as the motor for your swim.