Napoleon (and I read this as a little kid in another language, so I am not sure whether it's accurate or not) was the one who invented a formation of three row deep, first row lay down, second row kneel, and third row standing. First row fire while second and third rows reload, then second row fire while first and third rows reload, and then third row fire while first and second reload, and so on. Then it was adopted by the other nations during the Napoleonic Wars. Maybe that's why there are mostly rows of threes.
Those are marching formations. Combat formations don't have people firing with 10 rows one behind another. Excellent movie is Gods and Generals. It's about American Civil War in the later 19th century, but with improved weapons they still used same early 19th century Napoleon warfare. So heavy casualties. Anyway, in the movie, you see Major or Colonel Chamberlain have his men practice and repeat their changing from marching formation to battle formation. You heard his voiceover (and I don't remember verbatim): "the troops must change from marching formation of four long columns on the road, to the combat formation of two rows across the field. They must know it by heart and be able to do it without thinking. It's easy to change from a combat formation of two rows to a marching formation of four columns. But it's hard to change from the marching formation to the combat formation. And usually when it's done, it's done under fire in unexpected circumstances....."
And of course it's the later 19th century, so it's slightly different adaptation of Napoleonic warfare, hence two rows rather than three, in the earlier 19th century.
Bookmarks