Short summary is in the last line.
Consider this situation: Imagine a situation where there was no connecting tone when youre calling someone on the phone. As soon as you dialed, there will be a cone of silence. After the silence, either your call gets disconnected or suddenly the other person says hello out of the blue. That's weird right? You know why?
We always need a form of acknowledgement for any action we want to perform.
One more obvious fact to consider is, we are impatient by nature. For any action we perform, atleast in visual technology, average user start noticing something's not responding near 250th millisecond and on 1st second he tends to lose the focus on the task he's performing and near to 10th sec user will tend to close the browser tab (Check Google Performance Optimisation page for the facts)
Considering two above facts -- Lets answer look at your question:
When user performs an action, say Make Payment. If you don't show any message or visual indication as a form of acknowledgement, user gets impatient after couple of secs and tries clicking it again. Or, if you take user to another blank screen as a form of ack while in the backend you're waiting for the API response, again, user thinks he hasn't performed the action correctly. Goes back.
That's why, while the Payment is in progress, You'd see a message stating "Please don't refresh or close the tab". Why? Payment process takes time and we are impatient.
TLDR; To keep user engaged with his actions and corresponding acknowledgements to his action, we use content loaders