Why is quickly cooling a a hot pan bad for it? I've heard that really quickly cooling a hot pan is bad and reduces the lifetime of the pan. I'm wondering, from a chemical perspective, why this would be true. My thought is that as a pan is heated up, there may be slight rearrangements in the lattice of the metal, which, if allowed to cool, would likely reset into the correct portion of the lattice. On the other hand, if quickly cooled, perhaps these atoms don't make it back into the correct place, and this warps the pan.

As a secondary question to this idea of warping a pan, why would reheating the pan not cause it to return to the original shape? Seemingly, that original shape is a lower energy structure of the lattice, so with enough energy to overcome barriers, why would it not "unwarp"?
Specifically it depends on material the pan is made of. Just like how heated glass can crack once immediately expose to a source of the opposite temperature. For example, a cast iron skillet has the potential to crack when at a high temperature it is exposed to a much lower temperature. To answer your second question, the reason why reheating the pan wouldn't return it to its original shape is first, you would have melt the metals to reform it and second of all if a crack has occurred in the situation, it means the elastic limit has been reached. The elastic limit is the greatest stress something can undergo and return to its original shape. Beyond the elastic limit, it is impossible to return something to its original shape. I hope this helps!