What on earth…?
How on earth…?
Why on earth…?
You can use those expressions when you are extremely surprised, confused, or angry about something. It just means — tell me what is going on. What is happening? Why/how did that happen? Explain it to me.
What in the world is going on?
What in the wide world is going on?
• What on earth makes you think that?
• How on earth did this happen?
• Why on earth didn’t you tell me before?
“On earth” is an idiomatic way of intensifying the words what, where, why, etc. for emphasis.
Compare these sentences:
“What makes you think that?” is a simple request for information.
“What on earth makes you think that?” implies “What reason could there possibly be in the whole world for you to think that?”