Why did Peter Jackson think those goblins needed a musical number?
Because Tolkien wrote songs for them, actually. But they were implemented in truly piss poor fashion in The Hobbit movies.
Edit: but there's some good commentary on the BluRay of The Hobbit where Jackson basically says the studio rushed them into making the movies and they were flying by the seat of their pants the whole time, which is a recipe for disaster on any movie, let alone a multi-part big budget series. In comparison, they spent 3.5 years just *planning* LotR before they began shooting.