The Jug Band is from a closed attraction in Disneyland called America Sings. In Epic Mickey 2, it resides in Bog Easy.
The Jug Band has seen better days, and is now broken down and makes terrible noise. This noise somehow attracts a ghost named Phineas, who inhabits the machine. Mickey and Oswald must fix the machine for Ghost Rolly, and then Phineas will leave it. This will unlock the Silly Symphony Pin.
Alternatively, Mickey can thin the Band for Louis. This will unlock the Music to My Ears Pin. However, doing so will cause Rolly and Phineas to leave and Mickey will not be able to locate them for the rest of the game.