After America’s entrance into World War I, Major League Baseball games often featured patriotic rituals, such as players marching in formation during pregame military drills and bands playing patriotic songs. During the seventh-inning stretch of game one of the 1918 World Series, the band erupted into “The Star-Spangled Banner.” The Cubs and Red Sox players faced the centerfield flag pole and stood at attention. The crowd, already on their feet, began to sing along and applauded at the end of the song.
Given the positive reaction, the band played the song during the next two games, and when the Series moved to Boston, the Red Sox owner brought in a band and had the song played before the start of each remaining contest. After the war (and after the song was made the national anthem by a congressional resolution in 1931), the song continued to be played, but only on special occasions like opening day, national holidays and World Series games.
During World War II, baseball games again became venues for large-scale displays of patriotism, and technological advances in public address systems allowed songs to be played without a band. “The Star-Spangled Banner” was played before games throughout the course of the war, and by the time the war was over, the pregame singing of the national anthem had become cemented as a baseball ritual, after which it spread to other sports.