It will happen at intervals, whenever the enemy is within close proximity of you. Specifically, the little circle that's outlined on the ground.
If you have not shoved something within the last 2 seconds or so, it will happen the moment your shield comes up, and enemies are close enough. There's a small delay between shoves-- dropping and re-upping the shield seems to have it proc a little faster.
This isn't just for fun. It's an extremely useful trick for creating space between you and enemies, especially if you're surrounded.