But while eggs are still neatly packaged in an aseptic packaging even after coming out of their host, milk is not. So, milk (being a very good bacterial medium containing sugar, protein, vitamins and trace elements) can very well spoil by being left on the counter overnight. Been there, done that. OTOH, spoiled milk is easy to identify, and a quick sniff or a quick tasting will easily tell you if the milk is safe to drink. Butter doesn’t spoil easily, there’s just not enough water there to allow much microbial growth. Given time, butter turns rancid by oxidation, but rancid butter is also pretty easy to identify. You don’t want to eat that.
Side note: In the old days, milk was not pasteurized and would turn sour due to the natural lactic acid bacteria. We even soured milk to keep it for a long time and drank it without any problems. Modern industrial (pasteurized) milk turns rotten and downright nasty. Also, in the old days, people did get sick from eating or drinking spoiled foodstuffs. That’s why Louis Pasteur advocated the pasteurization of milk.