I don't think this is an accurate take on math. Beyond the fact that a lot of math fields deal explicitly with state updates (e.g. discrete math), there is also the constructionist framework for mathematical foundations which removes "non-computational" theorems like that law of the excluded middle. When you do this you get a form of math where all proofs are necessarily computational and there is a viable direct translation into code. It is not generally why many constructivist mathematicians are interested in that framework, but it is a nice side-effect.
I think your intuitions about how math works is an unfortunate side effect of how math is often taught, and not so much reflected in mathematics itself.
https://en.wikipedia.org/wiki/Constructivism_(philosophy_of_...