Before we had iPods, CDs, cassette tapes, vinyl, television or even radio, we had sheet music. You had no music in your house unless you were playing it yourself. People got tired of plinking “Twinkle twinkle little star” on the piano, so they would often go to the store to pick out some new songs that seemed amusing.
In many cases, the songs were currently being performed in vaudeville stage acts, and had achieved a certain word of mouth popularity; in other cases the songs were written specifically to be published and sold. Music publishers often made very colorful or humorous covers for the song sheets.
All that is fine, but when it came to white America’s relationship with African descendants, with slavery a recent memory, it is extremely troubling to say the least. “Blackface” vaudeville acts were very popular. White men would put shoe-polish on their faces and hands and perform stupid song-and-dance routines, singing and speaking in a faux-patois. There were also “minstrel shows” with African-Americans performing (for white audiences) these exaggerated and foolish routines.
Even when songs didn’t originate in these stage acts, there was a definite and solid market for vile, racist ditties, and music publishers never thought twice about bringing them to market. It was considered good, wholesome family entertainment.
Canada and England were not more virtuous — as you’ll see, a few of these were published (or republished) in those countries. Bear in mind that this is just a very small sample of what must have been hundreds of popular songs.