What a great question. Dangerous, though, depending on how you mean it.
Is it said in accusation? Unbelief? Anger?
Or is it an honest, “I want to learn” question?
Zechariah was told he was going to be a dad. He answered, “How shall I know this? For I am an old man, and my wife is advanced in years?”
Mary was told she was going to be a mom, and she responded the same way, “How will this be, since I am a virgin?”
But there was a difference.
Zechariah didn’t believe it. His answer was basically, “No I’m not – that’s crazy talk.”
Mary believed and was asking, in faith, “That’s incredible! How’s it going to happen?”
Zechariah didn’t speak again for nine months – God shut him up.
Mary learned how it was going to happen, and then sang a magnificent, wonderful song of gratitude.
If you ask “Why is this happening to me?” and it’s complaining self-pity, then you might expect a lesson in faith and patience. When I feel, “I don’t deserve this,” I might get a chance to appreciate what I’ve got. I might get a chance to realize I deserve worse. Or maybe I’ll get a chance to learn, like Job, that God does what he wants as if it’s none of my business. He’s not joining me in my self-pity.
If you ask sincerely because you want to learn why, so that you might grow and change, so that you might understand God’s ways more – you just might.