Many of these are related.
1. The grader can't give partial credit for what they don't see.
This is something that comes up when I grade actuarial exams. The people being graded never see my breakout of how I awarded points, but those of us on exam committees to compare how we give credit, and we all agree on one thing:
We can't give points for what we don't see.
I can't get too far into detail about what we're looking for, but in general it isn't every itty-bitty step - it's big stuff like identifying which formulas are relevant and which items relate to which parameters/variables, and then either calculating or solving the formulas.
I am not digging up this writing now, but I am willing to bet I got almost full points on a problem where I couldn't actually calculate anything, because I screwed up the first step. I wrote down the whole process of how to get the final answer and noted I couldn't figure how to go from step 0 to step 1.
It is in the self-interest of the student to try to optimize the number of points they earn. This is the lowest level of motivation.
2. We can show you where you went wrong if you show your work
In teaching math, this is the big thing. Students screw up all the time (teachers also screw up all the time, but we should be better at catching our errors).
It is not great if you did all the work in the calculator/in your head, didn't write any interim steps down, and have the final answer wrong. It means you have to do the whole thing over again from the start.
If you at least wrote down the major interim results (subtotals, reworked equations, etc.), we can see where it went wrong, and you only need to correct starting there.
It is very tedious to have to do one's problems over again and again... and yes, I know many teachers don't make their students rework their math problems until they get them correct, but THEY SHOULD.
3. In the "real world", you need to keep a record of your work for persuasion, audit, and more
Jumping off that last item -- the reason students should be made to keep correcting their math mistakes till it's correct is because that's what you do in the real world.
If you're working for me, and you screw up items in the spreadsheet you give me, my answer is not going to be "well, 80% of the cells are correct" -- it's going to be: "fix what's wrong". There is such thing as "good enough" or "close enough" in the business world, but it generally has little connection to an 80% at school.
If you have all your calculations in megaformulas, where you screwed up one of the conditionals in a monster nested IF formula, you're going to have a hell of a time correcting your screwed-up logic.
Separately, there are no answers in the back of the book when I need something calculated for my work. I have a good feel of what the numbers "should" look like, and I put in multiple checks of what I work on. That comes in handy when I have to hand over my spreadsheets to somebody else to use.
And finally, sometimes I have to make an argument that my approach to a problem is appropriate, and no, I can't just give the finished product. Generally, I need to show interim steps to convince other people I'm doing something reasonable that's useful for analyzing our situation.
Now, I understand in an elementary school situation, it can seem like an imposition to have to write down interim steps, especially if you did all the steps in your head. That was one of my complaints as a student.
But as I got older, I realized that I was working towards being able to communicate solutions to other people, which involved more than just giving a final answer.
We understand you have to build up writing skills as part of communicating with others, but "showing your work" is part of that -- it's like writing a persuasive essay. Often, you need to communicate connecting thoughts that you may think are obvious, but do not necessarily rise as immediate logical conclusions in the mind of the reader.
The level of step differs at different levels of learning and comprehension, and one would hope teachers would know the appropriate level of detail needed (I don't necessarily assume so). At the very least, though, teachers ought to be able to articulate why students need to show their work beyond "because I said so."
Also, teachers are not doing students any favors when they don't require students to build the skills to communicate results.