I have had this happen when my cell phone signal momentarily goes away, even if I am playing Apple Music through my WiFi connection. There seems to be a bug with iOS's Music app that causes playback top pause, even if playing offline tracks or when playing through WiFi, when the cellular signal is lost, which can happen even in a strong signal area (tower congestion/resets/interference). Putting the phone in Airplane mode (and optionally re-enabling wifi) is a work-around.
The other aspect is that due to licensing restrictions, most of the streaming services are supposed to stop playing after some duration if there is no interaction - typically two hours. Since the services pay per song streamed, they'd rather not pay for streaming if nobody is listening.. i.e. you left the house with Apple Music (or Pandora) playing merrily away. I'm sure this is why Apple Music (and Beats, before it) emphasize the curated playlists that last 60-120 minutes and as such have a natural ending.
My advice is to send Feedback to Apple on the intermittent pausing. As for having a day/evening of unattended background music, you'll either have to interact with AM (or Pandora, etc) to keep it "alive" or use a different service, such as SiriusXM (satellite based, as their internet stream has the same timeout restriction unless you get a business account). Of course, there are alternatives such as just using your own library on shuffle, or free Internet Radio streams, etc.
http://www.apple.com/feedback/