When the Union soldiers are caught looting, the commanding officer orders them to be flogged. The US Army according to the "History of the United States Army" stopped flogging at the beginning of the Civil War in 1861--this scene is obviously later in the war as Union forces are occupying the south.