The Shulchan Aruch (Orach Chaim 619:6) quotes a custom to remain in shul through the night of Yom Kippur, singing songs of praise to G-d. While some question the wisdom of this custom, cogently arguing that to do so would make concentration in prayer on the day of Yom Kippur most difficult (see Mishna Berura 616:14), the custom reflects the deep yearning of the Jewish people to feel the presence of G-d on the day of the year when He is most accessible. With G-d so close, how can one sleep? 

The all-night vigil has its precedent in the Temple service itself. The Kohen Gadol was forced to stay up throughout the night, lest a possible seminal emission disqualify him from performing the special service (avodah) on Yom Kippur. The Mishna (Yoma 1:6) records that those Kohanim who were knowledgeable would learn through the night, Torah study being the primary way in which we come close to G-d. 

Tragically, this was often not the case; many of the high priests during the second Temple period were unworthy, having attained their position of leadership through connections, bribery and the like. The Mishna records that Torah scholars would be appointed to read to these priests; “and what did they read? Iyov and Ezra and Divrei Hayamim”. 

The choice of these particular readings seem quite strange—why not read about Yom Kippur itself? The commentaries to the Mishna explain that these books were chosen because they "pull the heart", thus capturing the attention of the priests so that they could more easily stay awake. 

Clearly, the Rabbis had more in mind than tweaking the interest of the high priest, something that could more readily be done by, for example, reading the story of Joseph and his brothers or the battle of David and Goliath. Or why not read the Book of Yonah, which captivates us on the afternoon of Yom Kippur? 

Sefer Iyov confronts man with the problem of theodicy, the suffering of the righteous. Life is full of difficulty, tragedy and misfortune. We stand before G-d on Yom Kippur praying and pleading, but ultimately we know that we cannot fathom the ways of the Almighty. Yom Kippur is not about some magical formula of atonement but is meant to sensitize us to the suffering in the world and to inspire us to do something to alleviate it. 

Yet we do not dwell on tragedy. After despair, we must rebuild, returning to our roots and to our homeland. The Book of Ezra details the return to Zion seventy years after the Babylonian exile, much as the modern building of the State of Israel followed on the heels of the Holocaust. This rebuilding comes at great cost. The personal sacrifice entailed in rebuilding under extremely difficult circumstances must serve as an inspiration as we lay awake on Yom Kippur. 

Ezra also inspires us personally. It was he who re-established the centrality of Torah, establishing many of the patterns of Jewish life; he even created the Hebrew alphabet we now use. His stature was such that our Sages assert that "it would have been appropriate for the Torah to be given via Ezra, had Moshe not come first" (Sanhedrin 21b). This is an idea most appropriate on Yom Kippur, the day upon which the Torah was given anew.  

The Book of Ezra also contains a warning to the Jewish people. Ultimately the second commonwealth failed, a failure the Talmud (Yoma 9b) asserts had its roots in the fact that so few Jews actually left Bavel to return to the land of Israel. 

Divrei Hayamim, with its historical focus—beginning with Adam and ending with the permission granted by the Persian king, Koresh, to rebuild the second Temple—exhorts us to integrate the lessons of history and to examine why we have not yet succeeded in ushering in the messianic era. 

So unworthy and unlearned were some of the high priests that they did not even know Hebrew. For them, the Mishna continues, we read the (Aramaic) Book of Daniel. Although the language may have been more readily understood, its content is obscure and elusive. It discusses the future redemption, but in ways that we cannot comprehend. 

On Yom Kippur we recognize that we cannot begin to fathom G-d’s plan for the unfolding of history. Yet by developing our relationship with G-d—something which Yom Kippur, more than any other day, affords us the opportunity to do—we attain the highest form of joy, reveling in the presence of the Divine. "There were no days of joy greater for the Jewish people than the 15th of Av and Yom Kippur" (Taanit 26b).