Happened to me before on my old S3 LTE. I realized there was a particular batch of Sandisk cards that were very slightly thinner than usual, and would pop in and out of the SD card slot in the phone. Stop using the card in the phone if that's the case, because it will eventually lead to data corruption, and (most importantly for me) completely tank your battery life because the phone keeps scanning for media files every time the card is dismounted and remounted.
I'll second the observation that it seems like Sandisk cards are the most problematic with Samsung phones. I use a couple of cards, a Samsung Pro, a Strontium Nitro, and some generic Sony class 10 card, and none of them ever gave me problems. On the other hand, I used a Sandisk Extreme for a while and it promptly died on me, taking my entire mobile media library with it =.=