this is common for standing still for prolonged time
at remberance day ceremonies they have paramedics in standby just for this
Basically your body is fighting gravity to keep your blood pumping and make your heart work a lot harder, you're probably not getting enough blood/oxygen to your brain
moving around moves your blood too but you can't really do that if your at attention - can't do much about it
source:CPR course
If this were true then surely people would be constantly collapsing all the time.
Just think of all the formal military guards around the world, like the Queen's Guard outside Buckingham Palace or Swiss Guards at the Vatican, who would presumably be constantly caught collapsing on the spot.
I'm sure it's just common in parades and the likes because people are stood out there in fairly hot/heavy uniform, usually in the heat, carrying heavy weapons.
Add onto that those who might have skipped a proper breakfast and have low blood sugar. Fainting isn't unlikely in those circumstances, particularly for someone who doesn't normally stand still in those conditions all the time.