In *Star Wars: Episode VI - Return of the Jedi* (1983) in a scene we can see Luke trying to attack the Emperor with his lightsaber. But Darth Vader stops him.

Why does Vader stop Luke when he tries to kill the Emperor?