The song was originally written about baseball, but it became so popular that it became practically an anthem for baseball itself, thus it is sung at baseball games in honor of the game itself. It's a respect thing, like how we sing the national anthem in the US.