I am wondering how does Pandora on windows phone keep wifi connection alive when playing, even under lock screen. But if you pause it, the wifi would behave normally, which is turning off after a while under lock screen. Downloading keeps wifi alive I think, but I don't think Pandora is constantly downloading because it wouldn't make sense to have a 3 minute song continuously download for the whole time.
We don't get Pandora over here in Switzerland but my guess would be that they stream the audio and use a background audio streaming agent for the task. Have a look at this MSDN article where the agent and it's derivatives are explained in detail. So they aren't using any tricks but instead the standard Windows Phone API to keep WiFi alive.