You can thank Pvt. Willie Duckworth.
The tech manual for marching is FM 3-21.5 (FM 22-5 for you old farts), and it says:
Sing In Formation
“To enable soldiers to learn or maintain cadence and develop rhythm, the instructor should have them count cadence while marching. a. To count cadence while marching at quick time, the instructor gives the preparatory command, Count Cadence, as the left foot strikes the marching surface, and the command of execution, COUNT, the next time the left foot strikes the marching surface. The soldier begins to count the next time the left foot strikes the marching surface and counts as each foot strikes the marching surface—ONE, TWO, THREE, FOUR; ONE, TWO, THREE, FOUR. To count cadence while double-timing, the procedures are basically the same, except the soldier only counts each time the left foot strikes the marching surface. To maintain cadence when marching, soldiers will be allowed to sing, or a drummer’s beat may provide cadence.”
Singing songs while marching is to keep the formation in unison, it took Willie to put it to a tune in a segregated US Army of 1944. In a recent NPR article author Richard Rath, says “slaves brought work songs here, and they developed to help deal with dangerous jobs.” According to Ed Grisamore, and Army historian, “Duckworth was raised by his grandparents in a sharecropper’s house. He was working in a sawmill when he was drafted during World War II and assigned to a provisional training center at Fort Slocum, N.Y.”
A popular version of the “Duckworth Chant goes:”
“Ain’t no use in goin’ home.
Jody’s got your gal and gone.
Three, four …
On his 78th birthday, Mr. Duckworth noted that “the chant came from calling hogs at home.”