Whenever someone asks you to do something...
Whenever you try something new...
Whenever you're analyzing a problem...
Because more often than not, we don't think all the way through to the end goal or what we need to get there.
Because it's very easy to blindly follow orders and get caught in details that don't matter, or because it's the way things have always been done.
This is why I have a job. As an analyst, I cut through the bulls#!t, figure out what matters, and then find the best solution for a given problem. Asking "Why?" over and over again is the most effective way I've found to do this.
So why does "Why?" work?
Asking "Why?" let's you figure out the ultimate goal and focus on what's truly important. This cuts out any distractions or vanity metrics. Let's say someone asked me to evaluate a presidential candidate's success probability using social media data like number of twitter followers. I could be a good solider, do the analysis without thinking, and be completely wrong since sometimes 92% of a candidate's followers can be fake. OR I could ask "Why?" and pick a smarter approach, like how Nate Silver correctly predicted the outcome of the presidential election for each state.
(I know what I'd rather work on!)
I get asked to answer maybe 30+ questions in a given week. Each one requires a little bit of coding work or strategic thought. I don't have time to work on everything. "Why?" let's me decide what I do work on.
"Why are we doing this? What decisions will you make once you see the results?"
If the answer is "I don't know" or insignificant, I work on something else. "Why?" will free you from meaningless work and empower you to focus on what counts.
Asking "Why?" let's you question the status quo. Never do something because "It's the way we've always done it!"
Figure out why things are done the way they are, and then see if there's a way to improve. One day I spent 30 minutes investigating why a system worked a certain way, and discovered a logic flaw that was costing us ~$950k per year (we fixed the flaw very quickly). Sometimes the most profitable changes come from challenging the status quo.
There is no such thing as a stupid question. As long as the question moves you closer towards understanding the big picture. The smartest people I know are the ones that can go from zero to 100% understanding with the least amount of questions. "Why?" is almost always the first word they speak. Ask questions until you're out of questions. Understand the "whys" behind what you're doing, and everything you touch will matter.