Flags were usually used as rallying aspects during battles; soldiers could gather round their colorations for morale
https://zionzikt868.silverstonebrief.com/posts/the-impact-of-civil-war-flags-on-soldier-morale-and-identity
Flags were on occasion used as rallying features at some stage in battles; infantrymen could bring together round their colorings for morale fortify whilst confronted with overwhelming odds.