Each branch of military service has its own official song which is a part of its heritage and an anthem to rally behind. When played in a concert, these military songs are played in a particular order as directed by the Department of Defense. The order of precedence is Army, followed by Marine Corps, then the Navy, Air Force and Coast Guard. One exception to this guideline is when a service medley is played. In that case, it's acceptable to reverse the order and end with the Army song. If a branch of the service isn't represented at a concert, then its song can be omitted.
Army
"The Army Goes Rolling Along" was copyrighted in 1956 and traces its roots back to "The Caisson Song," a popular marching tune of the U.S. Field Artillery Corps during World War I. It was written by Lt. Edmund L. “Snitz” Gruber.
Marine Corps
Supposedly the first verse of the "Marines' Hymn" was written by an officer on-duty during the Mexican War. A new, unofficial verse is written for each major campaign the Marine Corps participates in. The song's melody is believed to come from an operatic aria in “Genevieve de Brabant” composed by Jacques Offenbach. The song was first used as the official Marine anthem in 1929, although the Marine Corps didn't get copyright ownership until 1991.
Navy
Football inspired the official Navy song, "Anchors Aweigh." Lt. Charles A. Zimmerman, the U.S. Navy bandmaster from 1887 to 1916, and Midshipman Alfred Hart Miles composed the song and lyrics together in 1906 to rally the crowd and be a motivational football marching song. The song is dedicated to the Naval Academy class of 1907 and was later adopted as the official service song.
Air Force
"The U.S. Air Force" song is the product of a 1938 Liberty magazine contest that the Army Air Corps sponsored. Written by Robert Crawford, the song beat out 756 other hopefuls. When the Army Air Corps became a separate branch of the military in 1947, the originally named “The Army Air Corps” became the “The U.S. Air Force.”
Coast Guard
Diverse geography influenced "Semper Paratus." Translated as "Always Ready," the official motto became a song title when Capt. Francis S. Van Boskerck was inspired in 1922. He wrote the lyrics in Savannah, Georgia, that year, and the accompanying music five years later in Unalaska, Alaska.