Ralph's actions there were that of a parent trying desperately to protect a child they thought would be very hurt or worse if they went through with this. He was under the impression Vanellope winning might have Sugar Rush unplugged, and then she'd be dead because she couldn't leave the game. It was akin to taking a toy from a child because they're chewing it to pieces and have choked on it once, and next time, you might not be there to help.
And it's this way because of what King Candy tells him.
no subject
And it's this way because of what King Candy tells him.