system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What happens to the water content of an egg that has been hard-boiled?

My eighty year old grandfather asked this question.

I told him that I think the water does not begin to evaporate unless the shell is cracked, otherwisd the moisture is still within the egg.

Am I wrong?
gpt
Most of an egg white is water and most of what isn't water is protein. When you cook the egg white and it becomes opaque and semi solid, it's not because you dehyrdrated the egg white, but rather because the proteins were denatured and have unfolded and refolded in such a way as to trap the water it contains in a sort of protein prison creating a gel mesh which keeps the water from running out.

By continuing to cook the egg, you can indeed make the folded protein mesh "squeeze" the water out of the eggs. This is most commonly seen in overcooked scrambled eggs, which get rather tough and then just release their water to pool in the pan or on the plate once too much heat has been applied.