Sheet music became commonplace in homes starting about 1840. Postcards came along some years later, but when the songwriters put their pens to a score postcards and music were a perfect match.
The masses of the world cannot know the joy of making music, which by every measure is tragic. If, however, your family owned a violin you may have had half-a-chance to play, but it would have required endless hours of practice. For those who did play an instrument, postcards became a way to tell the world.