Why does this happen?

Sometimes I'll be listening to a playlist and add some songs to the queue. After I've had enough of that playlist I'll go to another playlist or an album, tap on a song I want to start with and then somehow after the first song plays it'll still play all of the songs that I previously queued (even though I had already listened to them) + the rest of the playlist I was previously listening to... Am I doing something wrong or is this a glitch?