As we know, changing any value in components during gameplay mode will not persist. So why changing animation during gameplay save its state after turning off gameplay?
I think because it is an asset and not a component; same thing happens with materials.
@racarate is correct.
Changes to the scene get undone when leaving play mode.
Changes to assets do not.