When I hold a pair of scissors in between the HDMI and USB 3.0 port on my Acer r3 laptop, the computer immediately sleeps.
Thankfully you explain later on in your post this was an accident I was already scratching my head.
The pair of scissors that I need to use is nothing special, its made of stainless steel. I tried to do the same thing with a variety of metal objects, magnetised and non-magnetised, but I can't get the computer to sleep....
Well that debunks my only guess, that the scissors are magnetic and trip the magnetic sensor of the laptop lid so the laptop thinks the user closed the lid and goes to sleep.
So you can check this by going to the power settings, disable the laptop going to sleep on closing the lid and retry with your scissors.
In any case you need to find out what the laptop software think is happening.
There are many options to go to sleep from which power button, laptop lid, low battery etc.
So you first need to find out which of these is the case, which means disabling all sleep modes in the power settings except one and retry.
Also, is it bad for my computer? I mean it's perfect for when your parents walk into the room when you're watching EEVBlog and are supposed to be doing your homework...
It is probably not in the manual so not a perferred way of doing it
Seriously, I would not recommend doing it esp. for the case you describe, the chance is likely that due to the parents catch stress you might insert the scissors inside the USB connector and short out the 5V or physically damage it. For your parents you need BOSS software from the 80s and keyboard combination that immediately displays some important piece of homework on your screen, I would suggest a paint programm or picture for it where just alt-tab is enough for you to show that. But don't tell your parents and do your homework and make sure you pass your exams.