The Glock sure plug was designed to guide the magazine into the mag well to stop the magazine from snagging on structures within the Glock pistol.
The secondary function of the insert is to stop dirt and debris from entering the back strap channel of the grip.