Sometimes it certainly is high, but why inherently? Surely it depends on the particular problem you are interested in solving?
This is why mathematical proofs of software correctness are impossible in practice. A small 100-200 LOC program takes a qualified mathematician weeks to create a proof of correctness.
As someone who actually does formally prove things about algorithms significantly larger than that from to time, I believe you’re exaggerating here.
See the CompCert C compiler[1] for an example of using formal proofs in real world programming at a much larger scale.
No particular step of a program is complex, but it combines a lot of these simple steps.
And this leads to the “secret” of being able to construct proofs for realistic programs in useful amounts of time, in my experience: you have to be able to decompose the fundamental problem into manageable parts, prove some properties of interest for those parts, and then be able to compose the things you’ve proved separately in order to prove useful things about the overall system. We do this all the time with some properties in strong, static type systems, for example.