Ghee is a dairy product so in a sense, it may seem weird not to refrigerate it. However, ghee actually does not need refrigeration. Ghee is made from butter and is heated, at which point the milk solids and sugar are separated out and later removed. What is left is clarified butter. The milk solids and sugar are what would technically spoil at room temperature. The removal of the most of the milk solids and sugar (lactose) leaves little room for bacteria growth.
If you are still concerned, you have to remember that ghee originates from the south of Asia (India), which has little refrigeration and consistently high temperatures. Room temperature spoilage is not a concern there and likely should not be for most people living in North America. However, it would be wise to keep the ghee in an airtight container if you are going to leave it at room temperature. This will help eliminate the chance of contamination. Additionally, you should make sure that you are scooping the ghee from the container with clean utensil. This will ensure that bacteria does not transfer from the dirty spoon into the ghee to sit and marinate at room temperature.
Ghee will keep several months if you store it in a cool and dark place. Refrigeration will help keep ghee from potentially spoiling for beyond a year, but refrigerate turns ghee into a solid. In its solid form, ghee can be difficult to work with. It is much easier to cook with ghee at its room temperature form. If you have a surplus of ghee, it is best to keep the majority in the refrigerator while keeping a small portion in an airtight container at room temperature for easy access. The container should be very clean and kept in a dark cabinet.