In order to save battery power Windows Phone is turning WiFi off when the device is sleeping (screen off) relying on your data connection (if available) to keep all the sync activities working. According to a recent report Windows Phone could use your data for streaming music from the Xbox cloud even if WiFi is available.
How is this possible? Since WiFi is turned off when sleeping, if the streaming process has started in that state, it will reportedly continue to stream over Data Connection even if WiFi is available. Said report mentions that the issue happened several times on a Windows Phone 8X by HTC so, just to be on the safe side, make sure you only start streaming when you have a stable (and established) WiFi connection.