I have a MSI Z87-GD65 mobo with a Samsung 840 Evo 120 GB plugged into either the first or second sata port. I say either because it started plugged into the first but randomly decided not to recognize the boot device. I cleared this up temporarily by plugging it into the second port instead.
While trying to figure out what is wrong with my system I discovered in the BIOS that my SSD is being read as a sata2 connection instead of the sata3 that it is setup as.
go into bios/uefi and set AHCI mode instead of IDE- that might clear up the issue.
I had your first issue-no idea why and just swapped the sata port aswell.
Issue hasn't come up again.
I have the same mobo and ssd.
Good luck MSI brother!