Question 5 short beeps when only PSU is plugged


Jul 6, 2014
So a weird thing happened now, I unplugged my PC to take a look at a weird scrapping noise I was hearing recently, turns out (I think, it's a dying HDD), now, that's not my question..
I plugged in only the PSU power cable so I could hear what was making the noise and I heard 5 short beeps on power on and then it stops and the PC seems to be running normally, all fans spinning, no beeps afterwards (didn't have monitor plugged in but I assume everything was working normally) it happened every time I powered it on while it was laying on it's side case open.
I googled what 5 beeps mean and it says it's a cpu error of some sort (hopefully not a dying CPU), then I closed the case and reattached all the wires and the beeping is gone, I'm curious as to what it was? Any ideas?

The Mobo is GA-Z170-Gaming K3-EU rev 1.1 and cpu is i5-6600k

(sorry if wrong thread, wasn't sure what to choose as I'm not sure what's the cause)