I'm pretty sure you have heard of
Scott Joplin? He was an American composer., and the one responsible for writing Maple Leaf Rag. He definitely didn't have Canada in mind when he wrote this song, as far as I know.
Lyric were added to the song later.
"In 1903, Stark issued a "Maple Leaf Rag Song", an arrangement of Joplin's music with words by Sydney Brown.
[10] Brown's lyrics tell the story of a poor man from
Accomack County, Virginia, who stumbles into a ballroom where, in spite of his anxiety over the state of his appearance, he manages to wow the crowd with the Maple Leaf Rag. While the men are jealous of his dancing abilities and draw their razors, the women love him, and the "finest belle" sends for a carriage and the two of them ride away.
[12]"
*