http://revach.net/article.php?id=1012

Section: Moadim   Category: Elul-Tishrei
Elul: Noda BiYehuda - When The Resha'im & Tzaddikim Wait On Line
The Gemara in Rosh HaShana 16b says that on Rosh Hashana three books are open Reshaim, Tzadikim, and Beinonim. Tzadikim are immediately written in the book of life... The Noda B'Yehuda in his Drashos asks why are the Reshaim admitted first for judgment if the gemara says that out of respect, the King is judged before the rest of the people because has a higher stature. Another question he asks is when it comes time to the writing the verdicts into the various books suddenly, we find the tzaddikim written first. Why is this? He gives two answers.

"Olam Hafuch Ra'isi" we live in an upside down world says the gemara. Reshaim are thought to be Tzaddikim and vice versa. Therefore when everyone is waiting for judgment Hashem first admits the rich and honorable members of the community who are considered to be righteous, in order not to cause a commotion. After they are unmasked during Hashem's judgment, their verdict is put on hold and they wait until the real Tzadikim have been written into the book of life.

Another answer he gives is that the rushing of the Reshaim into court is all part of Hashem's kindness. Since the Reshaim continuously do aveiros, even on Rosh Hashana while waiting their turn on line they will manage to speak a few words of lashon hara and commit various other aveiros. Therefore we rush them into judgment to minimize the damage. On the other hand the tzadikkim who are desperately grabbing every mitzva they can get hold of are happy to have a few extra minutes to "Chap Arein" a few extra mitzvos before their day in court.