Some flights make money.
Some flights lose money.
Some finance structures make money while looking like losses to acrue tax benefits for other activities.
Sometimes the money is being made by holding companies not operating companies. Sometimes the assets are worth more as spares than operating.
All companies are complex. I do not think "flights don't make money" is true for all airlines, all flights.
Air France, British Airways, Finnair, Turkish Airlines, just to name a few, all have miles programs.
They just aren't tied to credit cards because the EU caps interchange fees to 0.3%, so there simply isn't enough money to have a meaningful credit card point system.