I’ve seen it a couple of times when I was doing PC repairs many years ago. Happens more often with RAM. Not actually sure why, but assume it’s something to do with corrosion on the contacts and sliding it back in scratches that off again for good contact.