All living things rely on a complex set of chemical reactions to stay alive, and it is important that nothing happen to prevent these from working efficiently. If it is too hot or too cold, or too wet or too dry, these reactions will not work as well as they would otherwise, or might not work at all. That would be bad. As a result, we shiver when we get cold to produce heat and we sweat when we are hot to cool us off, and regulate the kidneys to save water when we are dehydrated; other living things have similar mechanisms.