I'll take a stab at this and make the assumption that the streaming service may vary the bit rate of the music to accommodate bandwidth limitations. They would do this so that instead of having the music pause to buffer, or skip sections in the case of live streaming, that the quality will be downgraded while there is insufficient bandwidth to stream at full quality.
As for what can be done to make this issue not occur, you would first have to diagnose the reason for the lack of bandwidth. It could be an issue with Spotify's servers, their uplink, your ISP, your cable / DSL modem, your router, your device's wifi signal level, some other performance issue on your device, a software issue.
When you are experiencing the issue you can run an internet speed test using the site speedtest.net. If your score is low you could consider switching ISPs.