Ditto to what Tgo1014 said. I had the same problem when I enabled the "Driving" feature in the Assist app. On the same screen, I also had enabled the "Resume music play" feature. The next time I started driving, as soon as it sensed I was driving and went into driving mode, my music would start playing. I have no idea how it chose the song. It was neither the last song I had been playing; maybe it was the first song on the list of all the songs on my phone?
Anyway, disabled "resume music play" and it quit doing that.
I thought (still do) that this is a software bug. I expected that the "resume music play" feature would only kick in if you were listening to music when a call or text came in while in driving mode - stop music, go through the driving mode sequence for answering, sending a text, whatever, then resume the music.