They stayed because they wanted to destroy the Death Star.
They knew it was the ultimate terror weapon and was too powerful for any one planet to resist, crippling support for the Rebellion. The Empire knew they had the technical plans, so it was a race against time to find weaknesses and exploit them before the Empire found them and fixed them. And they knew (or Princess Leia correctly guessed they'd be tracked) it was conveniently coming straight to them with no fleet support.
Regardless of how much time passes between Leia landing with the plans (we'll assume secure Intergalactic Email does not exist), the Rebels decide to stand and fight. They couldn't have asked for a better opportunity.
What about the ceremony? It seems a bit premature given they should be spending their time frantically evacuating before a few dozen Star Destroyers show up.
As Richard pointed out, the non-essential staff would have already been evacuated in case of failure and to avoid the inevitable conventional Imperial counter-attack. The big ceremony at the end would be the pilots and their support staff... though there's an awful lot of pilots present, what were they doing during the battle? One possibility is the ceremony does not take place on Yavin. It's on a planet with similar architecture and foliage, same as if showed you a scene in New York and then a scene inside a building in Chicago. Would you be able to tell the difference?
Is there new canon support for this? No (though I haven't read the new stuff), this is speculation. Does it contradict anything seen in the movies? No, so that's something.