Because, the story goes, folks woke up late to receive the Torah from God, each year we make “reparations” or “rectification” (tikkun) by staying up all night (leil) on Shavu’ot to study. That way we cannot sleep through - and thus miss - anything important. (We note that the book tikkun may be used to do the studying, and there are other mystical meanings for “tikkun,”thus the very use of the word prompts some study.)
Some say the tradition was established by Rabbi Isaac Luria, a famous Kabbalist, in the 1500s, but there are references to the all-night study in the Zohar (which came out in the 13th century, although attributed to Rabbi Shimon bar Yochai earlier). Your correspondent opines that wherever its history began we may call this a long-standing tradition.
There are those who lean toward mysticism, saying that Shavu’ot is solemnizing the marriage - as Rabbi Akiva taught - of God with the Israelites (this was Rabbi Akiva’s take on the Song of Songs). Others who lean further into mysticism say that “tikkun” refers to the preparation of the Shekhinah for the union with God - the perceived feminine with the perceived masculine halves, if you will.
The Tikkun Leil Shavu’ot presented by the Jewish Federation of Greater Pittsburgh at the JCC in Squirrel Hill has traditionally been a veritable festival of various teachers, each teaching for 55 minutes, for the three hours between 10:00 p.m. and 1:00 a.m. Learners have flocked to the atrium for cheesecake and coffee to prepare to study. (One would think that fish - “brain food” - would be more appropriate!) Greeting old friends while coordinating which classes to attend (some couples attend different sessions and then compare notes later, while some negotiate and decide which they will attend together) fills the room with eager anticipation. (This year we understand the event has been pared down due to staffing issues, offering fewer study leaders, but it should still be a wonderful learning experience.)
So why do we eat cheesecake while we do this? That is another story entirely.