Yes, it is supposed to do that... at least if you bump one of its keys.
If you bump it without touching the keys it is not supposed to wake the computer. If it does, it needs repairs.
There is a high probability that when you bump your keyboard , your mous gets bumped too, even if it's only a fraction that would be enough to wake the computer
If you disable the keyboard and mouse on a laptop, make sure you have a USB mouse around to enable it. I did that once accidentally and didn't have a mouse to plug in. Had to go buy one.
Computer chips die because of thermal stress/strain of heating/cooling and chemical atom "migration". That is what kills a computer. That is why I wanted to have fixed CPU Frequency one step back from max, to eliminate TEMP cycling except for power-down/up.
If you have concerns about power-off, those apply equally to sleep. The only way to avoid it is to leave power on!