I always encouraged students to show their work, but if they got the right answer, then they were in the clear. If the answer was wrong, but they'd shown their work, I could usually grant partial credit if they'd shown that they understood the process but just screwed up on something minor.
Yes, in the real world, getting it right is all that counts, but school isn't the real world. In school, the idea is to learn the process. If a problem takes ten steps to solve and you got nine of the steps correct, I have to have some way of differentiating between that and the guy who literally had no idea what to do and left it blank.