Magruder was a playwright by trade, and he often put on stage shows to entertain his men. That's the sort of skill that doesn't come in super handy in a brutal, primitive war of attrition, but as Union soldiers descended on Yorktown, Magruder knew it was time for him to put on his greatest show yet for this new audience from the North.
With McClellan's forces gearing up to attack the fort, Magruder had his men scurry around inside and make a lot of noise, to make it seem as though there were more of them than there really were. They then hauled rocks around randomly so that, through McClellan's binoculars, it looked as though they were moving supplies around the fort that they didn't actually have, presumably while shouting, "Damn it, there's nowhere to sleep with all of these EXPLOSIVE CANNONBALLS laying everywhere! Go stack them next to the dragon's cage!" When the Union soldiers got too close, the Confederates fired haphazardly, to make it seem like they had plenty of ammunition to waste.
George N. Barnard/James F. Gibson
"Shouldn't we at least try to hit someone?"
"No ... that's just what those Yankees are expecting."