The misunderstanding is that they're not selling flights, they're mainly selling insurances and credit cards. The valuation of some airlines' loyalty programs is higher than their company valuation. That is: operating flights comes at a loss. Flights are just the bait, and then the process is designed to extract maximum value from the caught human through phsychological tricks. Agents are not so suspectible to those tricks, so the airline doesn't make enough money.
Must see by Wendover Productions: https://www.youtube.com/watch?v=ggUduBmvQ_4