Vader does indeed join the Stormtrooper Assault on the Rebel Base.
For reasons that were never explained.
When the rebels were planning their evacuation, they left the generator unmanned, which was key to them escaping, due to them also abandoning the ion cannon, which was protecting their evacuation.
Vader, if he had not joined his ground forces, would have been free to get his Star Destroyers to bombard the rebel camp. But he couldn't do that, he was in the camp!