The music widget is usually displayed when you play some music from your Music app. It is really useful—with the help of the widget you can stop or play the track, adjust the volume or switch to the next or the previous song on the playlist.

Probably because of all the handy features iOS doesn't allow you to close the music widget. It is only possible when you close the Music App.