He did some kind of ritual back then to free himself from his mortal body as his brother led Jedi against him. It backfired and he was trapped on Yavin IV, where Luke set up his academy. Naturally, when more beings showed up, he was eager to show himself and try to cause more trouble.