The Battle of Endor was an integral part of the Emperor's plan to seduce Luke to the dark side, so the Emperor's presence on the Death Star was necessary.
First of all, the Emperor's presence did influence the Rebel decision to attack the Death Star:
Mon Mothma: We also know that the weapon systems of this Death Star are not yet operational. With the Imperial Fleet spread throughout the galaxy in a vain effort to engage us, it is relatively unprotected. But most important of all, we've learned that the Emperor himself is personally overseeing the final stages of the construction of this Death Star.
While the Rebels probably would have attacked the Death Star eventually, Mon Mothma makes it clear that the Emperor's presence was of utmost importance and that they needed to attack as soon as possible (the Rebels couldn't be sure if the Emperor would stay on the Death Star much longer). The Emperor used himself as bait that the Rebels couldn't refuse. If the Rebels hadn't known of his presence, they probably would have spent a bit more time conducting reconnaissance and gathering intelligence. If so, they might have discovered the two big surprises the Emperor had for them:
- the Death Star's weapons systems were already operational
- the Imperial fleet was not dispersed throughout the galaxy, it was hiding on the other side of Endor.
If the Rebels had known this, they would have used a guerrilla attack (more like their attack on the first Death Star) instead of sending their fleet. By goading the Rebels into sending their entire fleet, the Emperor set up a decisive battle which the Empire would almost certainly win.
All this was a setup to seduce Luke to the dark side. The Emperor sprang his trap and Luke was forced to look on helplessly as his friends in the Rebel fleet were being slaughtered by both the Death Star superlaser and the Imperial fleet:
At this sight, the Emperor taunted Luke that the Rebellion will be crushed:
Your friends up there on the Sanctuary Moon are walking into a trap. As is your Rebel fleet! It was I who allowed the Alliance to know the location of the shield generator. It is quite safe from your pitiful little band. An entire legion of my best troops awaits them. Oh...I'm afraid the deflector shield will be quite operational when your friends arrive.
From here you will witness the final destruction of the Alliance, and the end of your insignificant Rebellion.
[touching Luke's lightsaber] You want this, don't you? The hate is swelling in you now. Take your Jedi weapon. Use it. I am unarmed. Strike me down with it. Give in to your anger. With each passing moment, you make yourself more my servant.
By confronting Luke at the Battle of Endor, Luke was given a front row seat to watch his friends die and the rebellion fail because of the Emperor. This was intended to enrage Luke so that he would (attempt to) strike down the Emperor in hatred and in doing so turn to the dark side. Therefore, the Emperor and Vader had to confront Luke on the Death Star.
The Emperor's primary goal was to seduce Luke to the dark side. The destruction of the Rebel fleet and ending of the rebellion at the Battle of Endor was a secondary objective. The Emperor cleverly devised a way to accomplish both at the same time, and in fact to make it easier to turn Luke to the dark side.