For the longest time, I really thought that getting the right answer was the goal and really the only thing that mattered. This misconception stuck with me all the way through elementary, middle and high school and was really not challenged until college. Through my K-12 experience I showed my work because I could not do the math without it. However, there was no reward for it. There was not partial credit, it was all about the correct answer. As a struggling math student (to the point where I actually started looking into careers that did not involve math) this really frustrated me because I was often unable to find the correct answer. (Especially in Geometry when writing proofs - ugh!)
It was not until I took College Algebra my freshman year of college that the work behind the problem became just as important, if not more so, than the correct answer. It was also, at that point, that math "clicked". The emphasis on showing my work helped me to the understand, make connections, and to truly appreciate the beauty of mathematics. Moreover, it also cemented my career path - to become a high school math teacher - who knew! Now as a teacher, here is what I explain, emphasize and illustrate to my students about why the final answer is not always the best answer to the problem.
1) Showing your work helps you to understand the "why" the answer is correct. My favorite question to ask my student whenever they give me an answer during a class discussion, during group work or even individual practice as I am walking around assisting them is "why". Why did you choose that formula, why did you draw that diagram,or why did you did set-up that equation? If my students can't answer why, I will help them out with leading questions or allow other students to do so (depending on the circumstance). I tell them upfront on day one, if you can't tell me "why" then I am going to keep asking. Sometimes it makes them laugh, but as I am consistent with making all students answer it, it also helps them to make it to reason two.
2) Showing your work helps you to understand the connections between different topics within a class and different branches of math . We as teachers, parents and adults, all know that math is circular in its connections to each other. When I teach parallel lines, for example, I review and apply the properties of angles that we study in our foundations chapter, setting up and solving algebraic equations that they learned in a previous class as well as the idea of determining whether or not their final answer in reasonable. If a student is not showing their work, they are not able to see these connections in action. They are not able to see how the math keeps "coming back". As the year goes on, these connections get even deeper. By the time I teacher my final unit - Three-dimensional figures - we are tying together area, linear equations, squares and square roots, triangles and at least four other topics! So often, I hear students say - wait, didn't we do x or y before and can't we use w and z here? The more we stress showing their work, being able to answer "why" and "where" the answer came from, the more we can move students to the most important reason I see for looking beyond just the final answer.
3) Showing your work helps you to retain the knowledge beyond just a quiz, test or other assessment. As much as we don't like it, standardized testing is a reality of this world that we live in. My students are gearing up for this in the new few weeks. Having done multiple types of practice with them through the year, I know how much inter-connection of topics and how much prior knowledge they need to retain. But it goes beyond that, beyond a single test (normally) during their junior year of high school. It goes on to a better attitude about math and a better appreciation how much impact math has the world around us. I seriously cannot count the number of times that I hear "I hate math" , "ugh, math was my worst subject" or "I never use math" when people find out that I am a math teacher. For those that I am lucky enough to continue the conversation with, the reason often comes out that they never truly understood why they had to do it or how it all worked.
While I definitely don't have all the answers, I do think that they more we can emphasize showing how you do the math, understanding why you need to do it and how the different ideas work together we are setting our students up for better performance on tests, in college, in their career paths and more. Yes, the final answer matters - we need to balance our checkbooks, we need to buy the right amount of paint or carpet - but we also need to know how to consistently arrive it!