Sleep mode is called sleep mode instead of straight up Off for a reason. Like people said, it's a state of minimalising the power consumption, but not being completely off. This is usually so you can go back into operation without waiting for everything to boot up again, and basically go back to where you were right away.
Like people said, you need some power for it to sense it being put out of sleep mode. Basically the reason why it can detect when it's on when you plug a cable in is simply because it's completing the actual circuit to power the guitar when you plug in a cable. That's how all power switches basically work. Just cuts off the power circuit or connects it, which is why it has no power drainage because the power isn't connected to the components when it's off.