The reason why the songs stopped after the screen of iPhone 5s turned black was because the music software didn't turn on "Application Auto-refresh". After the screen was locked, the program stopped running and the songs played stopped.
The specific steps to turn on "Application Auto-refresh" for iPhone 5s are as follows:
After opening the settings, click General;
Click the background application refresh;
Just turn on the music software that plays songs.