Code will tell you what but not the why. It also doesn’t always tell you the intent.
Tests were invented to express the "why" for the normal guy. They don't strictly prevent compilation, but a proper workflow will see them halt your process in the same way, offering the same outcome.
Granted, there are a lot of horribly written tests out there that don't tell you "why" — or, well, anything. As always, people will find a way to abuse anything you put in front of them. But when used well...
I'd also love it if this were applied to politics and laws.