it's how the body is made. for testicles to produce sperm and keep them alive they need to stay at a certain temperature (which is a bit lower than your regular temp hence the sack hanging lower to get rid of some of your body heat) when you are cold the sack rises to bring it closer to your body to get the heat from your body. when you are hot the sack lowers to cool off and be farther away from your body heat.
why does my testicle sack droop when i am hot and shrink when i am cold