One of the main reasons elephants use mud baths is to stay cool in hot climates. With their large bodies and thick skin, elephants are more susceptible to overheating than many other animals.
Both Asian and African elephants live in habitats that can get very hot. So, these warm-blooded animals have to take steps to stay cool. One thing elephants do to stay cool is flap their ears.