I have never understood why the National Anthem is played before sporting events. I have never equated my love for my country to a game.
Baseball was making a pitch to become the “national pastime.”
Playing the national anthem was a marketing move.
And since most people probably didn’t hear the national anthem that often, singing it at daily baseball games was thought to be good for the anthem and for patriotism.
In this case you are representing your country in international competition. In other sports it was adapted in 1918 world series as a display of national pride.