It teaches you how to move your hips to create room to improve your position while in the ground. Think of it as the first step to either regaining guard or returning to your feet.
The shrimping movement is foundational and very important.
Watch these heckin cute 5 year olds demonstrate how it looks. Notice that every time he performs the motion, his hips clear his partner's legs. And in real life, like in this drill, opponents rarely let you escape, so you often need to shrimp several times in order to successfully create enough space to improve your position.