First, know that many people are not concerned with the optimal action in the same way that you are. If you are analyzing which approach would be better in a certain situation (the way you currently do something vs the way you are seeing something done), that is necessarily comparative. While your intention may be to try to figure out if their approach is better, or even mere idle curiosity, people will often respond negatively because they can sense the comparison.
If this person is your report, then I would advise that you typically not ask them, unless you suspect that their approach really is better, and want to learn how to improve yourself. (In which case, flattery can go a long way). There is little to be gained (fulfilling idle curiosity), and a very high cost in the long run in terms of employee dissatisfaction.
If they are not your report, you could have a conversation with them once, at the start, and explain that you have this quirk. You can explain what is meant by it, ask them if it's okay if you ask those kinds of questions, and emphasize that if it ever makes them feel uncomfortable, they should feel free to say so - it is truly meant to be friendly, and you don't want them to feel put upon in any way. This gives them an exit clause in case they don't like a particular line of questioning.
A word of warning about this second path: it is a little fraught. You will need to check in from time to time if you are unsure whether your questions are still being received with warmth. Again, the potential benefits are small, but the potential costs are high. Don't mess around with important long-term professional relationships without good cause.