MacOS might occasionally be weird, but that definitely sounds like some kind of electrical issue, probably nothing to do with the OS.
But you're right -- I was possibly too quick to snark about MacOS when the real culprit is more likely the cheap random HDMI cable I used. :)