Why are dairy foods eaten on Shavuot?
Short answer
It is a custom, not a requirement of the festival. The Rema records it and connects it to the two loaves; later sources offer additional explanations, including the difficulty of preparing kosher meat immediately after Sinai. The checked sources do not present one universally accepted reason.
A custom, not an obligation
The Rema records a custom to eat dairy on the first day of Shavuot. His wording describes an established custom, not a Torah command or a requirement created by the Talmud.
Open the source in Madreigaונוהגין בכל מקום לאכול מאכלי חלב ביום ראשון של שבועות
One explanation: the two loaves
One explanation given by the Rema connects a dairy course followed by a meat course with the need for separate loaves. Those loaves recall the two-loaf offering brought on Shavuot. The Mishnah Berurah's explanation also makes clear that the ordinary separation of meat and dairy still applies.
Open the source in Madreigaוצריכין להביא עמהם שתי לחמים דאסור לאכול בשר וחלב מלחם אחד ויש בזה זכרון לשתי הלחם
Another explanation: preparing food after Sinai
The Mishnah Berurah offers another explanation: after receiving the laws of kashrut at Sinai, preparing meat required proper slaughter, removal of forbidden fats and blood, salting, and suitable utensils, while dairy was immediately available. This is a later explanation of the custom, not a historical event narrated by the Torah's verses.
Open the source in Madreigaלא מצאו מה לאכול תיכף כ"א מאכלי חלב כי לבשר צריך הכנה רבה לשחוט בסכין בדוק
The Magen Avraham opens his discussion with a short reminder that no single explanation should be treated as exclusive:
Open the source in Madreigaיש הרבה טעמים
What this means in practice
Dairy is not a condition of observing Shavuot, and families and communities express the custom in different ways. The custom also does not suspend the separation of meat and dairy; practical details between foods or meals depend on Halacha and community practice.