"If it has that much to do with it, why wasn't this shortage and high prices when the fighting was at it's peak?"
Because the military doens't keep 3 rounds in ready reserve and runs to the Wal Mart to replace them when a soldier shoots them.
The military keeps hundreds of millions, if not BILLIONS, of rounds of ammunition in reserve.
When military operations started, they started drawing down from that supply. Lake City, the military's main ammo plant, kicked up production to start replacing the draw down.
As fighting increased, Lake City's capacity was stripped. So the military started levying larger contracts with civilian producers. To meet those contracts, they started taking lines used for manufacturing commercial ammo off line.
That had a growing ripple effect on the supply of commercial ammo.
As the scope and length of military operations increased, more ammo was needed, and more civilian ammo lines were converted to military production.
These are processes that don't take days or weeks, but MONTHS to fully show up.
The military has started scaling back on its ammo purchases, and more lines are being converted back to civilian production, but it's not an overnight thing. It's going to take awhile.
Unfortunately, at the same time that was happening, Obama was elected president, and people were very afraid what he was going to do.
Put those two events together and you get the proverbial perfect storm.