I have had my iPad on iOS 5.0.1 for a while, and restored it a couple of months ago, wiping all the content. Today I put some music back on (this is iOS 5.1.1 now) and while the music player works, as soon as I close it the music stops (I say 'stops' rather than 'pauses' because using the play button in the multitasking tray starts the song from the beginning as if the Music app hadn't been running.
This does not happen when playing music from other apps such as Dropbox.
It may have something to do with there not being enough memory and the Music app trying to accommodate for that by stopping the music the moment you exit it.
While normally you don't have to worry about closing individual apps that are in the app tray, for debugging this issue, I would recommend that close every app that is in the app launcher, then restart the iPad. Once it is restarted, launch only the music app and play the music. Then try going back to the home screen and see if you get different results. There is a possibility that one of the apps you have is misbehaving, and using excess amounts of memory even while it is closed. I have seen this happen many times.
Okay, I have found the problem, it was my own stupid fault and I can't believe I didn't realise earlier. I had installed Backgrounder, a Cydia app to control multitasking, and something in its settings must have had Music terminate on close. How I didn't put two and two together, I don't know.