Why does ghee not spoil

Ghee remains fine without refrigerator, but butter gets spoiled, why?

Ghee and butter are both made from milk. However, there is a lot of difference…