I disagree with “code can be thought of as formal requirements” - perhaps if you twist the meaning of the word requirement, yes.
This analogy puts us into a place where we mix intent and implementation and make them the same. It doesn’t allow for bugs in a sense.
This is why I dislike analogous thinking!