To cool your body off. If it is hot and you are sweating your body is providing water for cooling your body off. To maintain homeostasis you need to keep a balanced temperature right. to do that you need to sweat on a hot day. I am in 7th grade, so I already learned this i love science