Well, the thing is that the music was stolen. It was a mixture of Scottish folk songs, opera arias, and popular tunes, all well-known at the time of the first production (and so with a large amount of hummability built-in).
The Beggar's Opera was written to make fun of traditional opera, traditional morals, politicians, and polite society. It was a massive success on all fronts.
Opera at the time tended to be extremely large and heroic, full of Gods and Heroes and vocal gymnastics from foreign stars. The Beggar's Opera was about the criminal under-class of London, and was sung by undistinguished Londoners (though Lavinia Fenton, the ex-prostitute and barmaid who played the leading lady, Polly Peachum, eventually became a duchess).
Another factor in The Beggar's Opera's success was that traditional opera was supported by the king, George II, with whom his son Frederick the Prince of Wales was having a life-long feud. Half of London was placing its bets on Frederick, as likely to be the survivor (though as it happens he wasn't). Because The Beggar's Opera was making fun of opera, it was seized upon as an opportunity to cock a snook at the king's court.
The Beggar's Opera was so successful in establishing its own new genre that the very great opera composer Handel found that operas in the grand style were no longer commercially viable - and that meant he had to invent his own new art form, oratorio. And so we have Jeptha, and The Messiah. A definite win for the world.
So, The Beggar's Opera is play about thieves, with stolen music...
...I just hope that when people asked Gay where did you get the idea from? as people do, Gay admitted he got it from a suggestion by the great Jonathan Swift of Gulliver's Travels fame. John Gay was a much loved man, very much supported by the other literary figures of the time, so I would imagine this was one bit of thievery he wouldn't have countenanced.
Here's a song from the opera. In this clip it's sung by Lawrence Olivier and Dorothy Tutin:
As you can see, it's not just the satire that made The Beggar's Opera a success, but the depth of human feeling.
Aaaaahhhhh...
Word To Use Today: beggar. The word beg appeared in English in the 1200s. It's probably something to do with the Old English bedician, which itself meant beggar.