What's the purpose of clarifying butter?
You can heat clarified butter to a higher temperature for two reasons -- you remove the milk solids, which can burn, and you remove the water, which will boil at 100°C and cause spattering.

In baking, clarified butter's lack of water means that it can't develop gluten as you would with simple melted butter.  It's actually more similar to other oils than it is to melted butter when baking.

In the case of ghee, my understanding is that because it's from a warm country, part of the reason for making it was as a preservative, as the ghee would have a longer shelf-life  (months) than standard butter in the local climate.