I wouldn't call that spraying and praying. He was firing at a target about 15 feet away. I would assume that putting a large amount of fire power in a general direction would keep the enemy's head down so you can maneuver to a better location..... He did exactly what I would do.... send a bunch of lead into the general direction and then advance. Despite what you might think, a bunch of lead and pieces of wall blasting you in the face or around you is going to keep your head down or at least your eyes closed.
In WWII the new guys going into combat would have to get re-trained from what they were taught in basic because they would only shoot at what they could see. The veterans had to teach them that they need to put a specific amount of firepower on an AREA, even if they couldn't see an enemy, so they could maneuver and advance onto a better position.