Q. The Torah says: 'Vayehi erev vayehi boker" (mentioning night before day). The Talmud also starts out by discussing the dinim of krias Shema at night. Why, then, does the Shulchan Aruch begin with the halachos that apply in the morning? Why doesn't it follow the same pattern as the Chumash and the Talmud?
A. Actually the Torah was given in the early morning at the beginning of the day and it is then that we became obliged in keeping most mitzvos. Mishna Berura (494: 12) quoting Rav S’aadia Gaon mentions that one of the reasons for consuming milk food on Shavuos, is that on that morning they began to observe dietary laws, and preparing meat food would be practically impossible. Aptly and fittingly, the Shulchan Aruch would follow that beginning.
Horav Shlomo Miller’s Shlit’a opinion is that the Shulchan Aruch that dictates and instructs the factual practical ways in Halacha one is to follow every day, begins, when people begin their day and their activities.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a