The playing of the Star-Spangled Banner is so familiar and perfunctory a trapping of sporting events in the United States that few Americans even bothered to consider what it means and why it’s a tradition until last year when Colin Kaepernick chose to take a knee in protest of police violence and racial inequality. The stakes were redoubled this September when Donald Trump called on NFL owners to fire any players who kneel, recasting Kaepernick’s movement as not a protest of social injustice but an affront on patriotism and an insult to the military soldiers who paid the ultimate price for freedom.

But how did a song about the War of 1812 that wasn’t even adopted as the national anthem until the 1930s become so indelibly bound to the American sporting experience? It didn’t happen overnight.

While the first documented performance of the Star-Spangled Banner at a sporting event was before an 1862 baseball game in Brooklyn, the anthem as game-day ritual became crystallized in the national consciousness during Game 1 of the 1918 World Series between the Red Sox and Cubs at Chicago’s Comiskey Park. These were the days before stadium sound systems that blast pop music at ear-splitting volumes during even the thinnest slivers of down time. Live music was a luxury that incurred the cost of hiring a military band, which left renditions of the anthem for special occasions like opening day or the World Series.

The United States had lost more than 100,000 soldiers in the 17 months since entering the first world war and morale had been further undercut by the bombing of the Chicago Federal Building only four days earlier, an attack that killed four people and injured 30 more. Attendance for the opener was low and public morale was lower, while a pitchers’ duel – ultimately won by Boston pitcher Babe Ruth! – did little to stoke passions in the stands.

That was until the military band on hand played the Star-Spangled Banner during the seventh-inning stretch and Red Sox third baseman Fred Thomas, playing the Fall Classic while on furlough from the US Navy, stood at attention toward the flag atop the pole in right field.

“The yawn was checked and heads were bared as the ball players turned quickly about and faced the music,” read the New York Times’ account the following day. “First the song was taken up by a few, then others joined, and when the final notes came, a great volume of melody rolled across the field. It was at the very end that the onlookers exploded into thunderous applause and rent the air with a cheer that marked the highest point of the day’s enthusiasm.”

Members of the New York Yankees baseball team hold their caps over their hearts during the national anthem before Game 8 of the 1921 World Series. Photograph: FPG/Getty Images

The song wouldn’t be officially adopted as the national anthem until a congressional resolution in 1931, but the impact of the moment was not lost on baseball’s power brokers, who had stood by as the government began drafting major league ballplayers for military service while shortening the season by a month.

“Professional sports needed to define themselves as patriotic in order to be seen as as part of the war on the home front and center for morale rather than as an expendable entertainment which is how they were initially,” says Mark Clague, an associate professor of musicology at the University of Michigan who is one of the nation’s foremost experts on The Star-Spangled Banner, lest we believe anything but the owners’ self-interest made the anthem into the ubiquitous tradition we know today.

Clague says the development and proliferation of stadium technology enabling the playing of pre-recorded music combined with a groundswell of patriotism during and after the second world war has given the anthem an almost continuous place in baseball in the years since. Football was similarly keen to wrap itself in the flag with NFL commissioner Elmer Layden in 1945 calling for a league-wide adoption of the anthem, saying: “The national anthem should be as much a part of every game as the kick-off. We must not drop it simply because the war is over. We should never forget what it stands for.”

Says Clague: “When world war two happened, professional sports had really figured out that patriotism was good for their business and it protected them against this question of being defined as a non-essential occupation.”

Criticism over anthem etiquette is nearly as old as the tradition itself. In 1954, Arthur Ellers, the Baltimore Orioles’ general manager and a world war one veteran, bemoaned that spectators conversed and laughed and moved around while the anthem was played. Celebrities enlisted to perform the anthem from Roseanne to Christina Aguilera to R Kelly have absorbed withering criticism, while a long line of athletes prior Kaepernick have taken heat for falling short in their fealty, either intentionally or otherwise.

These days, the 203-year-old song has exposed a fault line between those who see the anthem and flag as ideals beyond reproach and others who believe patriotism is contingent on how a country treats its citizens. But the NFL’s place on the front lines of the debate is curious when you consider that players weren’t even required to stand on the field for the anthem, with the exception of the Super Bowl and extraordinary circumstances such as the aftermath of 9/11, until 2009. That the hurlyburly threatening the future of America’s most popular sports league centers on an eight-year-old tradition really is something.

The bombastic pre-game spectacles of patriotism that had become commonplace at NFL games began to make sense in 2015, after a report by Republican senators John McCain and Jeff Flake revealed the Department of Defense had spread $6.8m of taxpayer money among more than 50 professional teams across the NFL, NBA, MLB, MLS and Nascar. In return, the teams promised organized displays of national pride including the honoring of members of the armed forces, surprise military homecomings and on-field color guard and reenlistment ceremonies. The co-opting of America’s most popular institutions as recruiting tools went by an easy-to-remember name: paid patriotism.

“Americans deserve the ability to assume that tributes for our men and women in military uniform are genuine displays of national pride, which many are, rather than taxpayer-funded DOD marketing gimmicks,” the 145-page report said.

Kareem Abdul-Jabbar, the NBA’s all-time leading scorer and a longtime champion of civil rights, was to the point in his defense of Kaepernick for the Washington Post. He wrote: “What should horrify Americans is not Kaepernick’s choice to remain seated during the national anthem, but that nearly 50 years after [Muhammad] Ali was banned from boxing for his stance and Tommie Smith and John Carlos’ raised fists caused public ostracization and numerous death threats, we still need to call attention to the same racial inequities. Failure to fix this problem is what’s really un-American here.”

Stick to sports? Good luck. It’s clear by now that the battle hymn at the center of national debate in the US will always be associated with the games we watch. If only our commitment to the issues put forth by Kaepernick and co was as resolute.