"How did you choose this algorithm?" can be ever worse than "why" because you're questioning my "processes", which are closer to my "self", whereas "why" can be interpreted as questioning the outcome.
Perhaps even better, albeit informal: "Why this algorithm?"
"Why" is a question of motives and limiting factors, not outcome. The outcome itself isn't the question being asked as it's already a known or imminent by the time one asks the question.
Perhaps even better, albeit informal: "Why this algorithm?"