Why is a margarita glass shaped the way it is?

I was shopping online recently and noticed a nice set of “margarita glasses”. Why are they shaped a certain way?