This is a very annoying bug, where if the background music starts in-game, then you quit to the main menu, the music continues, even if you enter another world.
Here's how to represent the bug:
1. Open a Minecraft version which is 1.9 or higher. (i tested it in 1.9.2)
2. Start a new world.
3. Wait until a background music starts playing.
4. Press Esc and exit to the main menu.
The music which played in the world, will continue playing, and will not stop until it ends or you close the game.
(sorry for my bad english)