When it is hot, the body temperature is regulated through sweating. In order for this mechanism to function properly, the body needs to have enough fluid and a proper balance of water and ions, meaning that it is important that the concentration of the bodily fluid always remains constant.
When we sweat, we lose water and ions — mostly sodium and chloride (salt). If you drink just water to replenish lost fluid, the balance of water and ions in the body breaks down, and the osmolality (level of electrolytes in the bodily fluid) gradually decreases. In order to halt this trend, your body automatically stops the feeling of thirst, and seeks to eliminate excess water as urine. As a result, the normal bodily fluid level is not sufficiently replenished. This phenomenon is called spontaneous dehydration.