Real estate agents are not paid a salary - they earn commissions. If you're pulling that average salary from somewhere, well, it's not REALLY an average. A very few earn a lot, lot more, into the millions. A decent number make quite a bit more. Another decent number probably earn around that number, which is not a great income today. But there are a LOT of part timers who sell only a few houses a year while doing something else to earn a living, and they pull that 'average' down.
Consider also that there are far, far more people selling real estate and insurance than there are mortgage brokers. For every 50 full-time real estate agents there might be one mortgage broker.