The music can play offline because the device downloads the stream. If the device is offline for a certain amount of time, the music will start to repeat. In addition, if the device is offline for an extended amount of time the music could potentially revert to the default music it was first loaded with or the stream will go silent.
If you are having issues with the player, follow the instructions in this article.