The movement serves several purposes:
A blocking motion
This is used with single edge blades as you keep the back of the blade against the body, usually contacting around the shoulder blades. Any attacks in are deflected by the blade, but the two bracing points (hand + shoulder blade) provide stability and can cause the attacker's blade to bounce back - leaving an opening for a cut through.
Filipino blade arts will often use a similar motion with their "umbrella block" using the free arm's forearm as the second brace point.
Feint and reposition
It's an excellent way to shift your attack direction from one angle to the other at close ranges. When you watch the form, or from a distance, it doesn't seem like much, but close range, it works very well for losing people's sight tracking if they're not familiar with it.
Pivot attack off the body
You can increase the force of an attack by effectively whipping the weapon around a pivot, which can be your shoulder blades against someone nearly behind you, or, off your opposite shoulder at an angle to the front. (Many short blade arts also use the forearm as a pivot as well, except in those cases it makes as much sense to push the forearm forward at the same time as well.)
Contraindications
Naturally, though, this movement is all for close range fighting, almost at arm length or closer. It's a useless movement if you try to use it against a long weapon or someone whose tactics are in-and-out with thrusting.
Movies & TV like it because it looks cool and often allows the "I blocked your attack from behind" trope, but you never really see the practical application, which often is "I grab one of your arms and hack it off" or "I reverse the slash and turn it into a stab right away" which doesn't look really good for the camera.