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.
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!