How can I prevent the iPad 2 from playing music in my rucksack?
Arrrgh. 

I found the reason, my own stupidity. :) I use a Bluetooth keyboard whose keys are extremely sensitive to pressure when it's stowed in the backpack. It usually goes to sleep when not used, but wakes up when you press a key. The "play" key on that keyboard was what made the iPad blare away.