What is the purpose of raita? Raita is usually served with spicy dishes like biryani. If the purpose was that the curd in raita would give some relief from the hot, spicy food, then why are chillies and onion added to raita?  

Personally, I dislike any foreign objects in the curd I drink. Even if it's "boondi" or mint in the raita.  

Was raita meant to give relief from the spices or is there some nuance I don't know about curd being used as a side dish? I considered comparing it to mayo, but I guess the purpose of mayo is to impart a cool, moist feeling to the food.
Raita is a side dish or condiment meant to go along with a variety of Indian dishes.  It's purpose is to complement the other offerings in the meal.  It is not specifically designed to give relief from spices, though some claim this is true.