Possibly the most random and obscure question ever asked on this subreddit, but it occurred to me, and I would love to know the answer.
Ice cream parlors at the turn of the century used to play minstrel music to keep their customers entertained. A popular song, set to 'Turkey in the Straw', was 'Nigger Love A Watermelon! Ha! Ha! Ha!' - it was very popular in its time.
As a way to make a correlation between the pleasant experiences in a ice cream parlor, early ice cream trucks would also play similar music from music boxes. Leading to the wordless jingling rendition that we all know.
Source: Code Switch article, from NPR
For what it's worth, I've never heard the song before. The standard tune here in Australia seems to be/was "Greensleeves". Any ideas how that happened?