Retail order flow is worth buying because it's what's called "non-toxic". That means the retail traders generally don't know which way the market is going, ie they are either wrong or too small to make the market move against the market maker.
Contrast that to trading against a hedge fund which might have a better clue and is potentially large enough to push the market in some stock.
Liquidity is unlike hamburgers in that there is a risk profile associated with it if you sell it to anyone who wants it. Adverse selection happens as detailed elsewhere; you lose money on their custom, potentially a lot of money relative to the margin on your product.
Certain buyers of liquidity are, like essentially all buyers of hamburgers, functionally riskless. You can profitably sell your product to them at a positive margin all day long, at virtually any quantity they could demand.
Payment for order flow is setting up a liquidity stand in a place where you structurally only get the non-risky customers. That liquidity stand is, like a hamburger shop, a cash machine, and justifies CapEx and OpEx to run. Part of the OpEx is paying your landlord for prominent placement of your liquidity stand in front of willing customers who are buying that sweet, sweet liquidity you're selling.
The price of liquidity changes moment-to-moment based on market conditions but is effectively standardized by law nationwide (NBBO). You are not overcharging your customers for liquidity; they pay the same price literally anyone in the country buying it in that instant does and you can, at your option, discount it further to reward them for buying it from you.
You are making superior margins on their custom because you don't inevitably lose lots of money by being in the liquidity business. The liquidity stand down the street is doing the same thing; your vicious competition against each other has caused the prices for your product to crater, to the enduring joy of the people who line up daily to buy your liquidity.
Also I don't define front running that way, FINRA does.
https://www.finra.org/rules-guidance/rulebooks/finra-rules/5...