It is customary to eat dairy foods on Shavuot, possibly as one component in re-enacting the Sinai experience.
Having just received the laws about kosher food at Sinai, the Jewish people had no choice but to limit themselves to dairy or plant-based foods. They could not eat meat right after Sinai since that would require kosher slaughter, salting and other preparations before it could be eaten.
So all they were left with was dairy food - like delicious cheesecake!