Tofu releases water after reheating because the heating process causes the protein structure to contract, squeezing out the moisture that was previously absorbed within the tofu. This is similar to squeezing a sponge.
Tofu is essentially a sponge-like food made from soybean curds. During the initial production process, the tofu absorbs a significant amount of water. When you reheat tofu, especially using methods like microwaving or pan-frying, the heat causes the proteins within the tofu to denature and tighten. This contraction of the protein matrix forces the water that was trapped inside the tofu's structure to be expelled. The amount of water released depends on the type of tofu (firmer tofu generally releases less water) and the reheating method used. Higher heat and longer reheating times will typically result in more water being released. This process doesn't necessarily mean the tofu is spoiled; it's simply a physical change due to the application of heat.
To minimize water release and improve the texture of reheated tofu, press the tofu before cooking it initially. This removes excess water and allows it to absorb flavors better. Then, when reheating, consider using a dry heat method like baking or air frying to help maintain a firmer texture.