During the war in heaven a group of necrons wanted to understand their enemies namely the krorks aka ancient orks in order to fight them better. So one of them had the absolutely terrible idea of converting a few of them into necromasis shells in some hair brained scheme to fight fire with fire which ended with the newly made necrorks killing them all using their own technology. And that's about it.
In Necron Lore, every single Necron in the War of Heaven was under direct control of The Silent King. Like if it was an RTS game and The Silent King was the player, basically. They couldn't deviate from his command even if they wished to. When they went to sleep, The Silent King broke the obedience commands.
IIRC he broke whatever it was that let him control them like puppets when they went to sleep so they'd be in control of their own bodies again. Might have changed in the new edition, though. Zcee'll know better than me.