Ideally, but this is not at all taught or incentivized in (American) schools. We're taught to "hack it" which means getting to a solution without much regard for how we got there.
Documenting and analyzing your solution is an extremely important part of managing risk, which is what engineers actually do.