Moving while shooting causes the bullets to spread uncontrollably, it's a mechanic from Counterstrike to encourage careful movement and patience. It's not the most intuitive, but our game was a direct homage to CS so we copied some mechanics directly. I'm glad you enjoyed even though that part was frustrating!