Customers pay brokers a commission to execute their orders. This involves a customer trusting a broker with their confidential order information. Until an order goes to the exchanges, only the customer and broker know about it. The order is material non-public information.
Brokers have a fiduciary obligation to look out for their customers' interests. This applies even when the customer's interests conflict with the broker's. For example, suppose a broker holds Tesla stock. A knowledgeable customer calls the broker, seeking to sell 2 million shares. This would depress Tesla's stock price. Front-running would involve the broker selling his shares first, and then the customer's. This violates the broker's fiduciary obligation. That is why it is fraudulent and thus illegal–an explicit trust relationship would be ruptured.
Across the trading floor from the brokers are us market makers. We trade our own capital. We also have no customers and thus no fiduciary obligations. Our income comes from the bid-ask spread (and liquidity-provider rebates from exchanges). For example, here is how a phone call might go:
COUNTERPARTY: "2 million Tesla?"
MARKET MAKER: "209 at 210."
COUNTERPARTY: "Buy 2 million Tesla for 209."
The counterparty is looking to buy or sell 2 million shares of Tesla stock. They do not specify which in advance. The market maker says they will buy at $209 or sell at $210. The customer then confirms that they want to buy, and will buy at $210.
An order, when properly executed, does not betray its owner's intentions. This applies as much in the meat space as in HFT. For example, here is how one would not place an order:
COUNTERPARTY: "I am looking to sell 2 million shares of Tesla stock at whatever price you'll give me. My wife just left me for a Brazillian stripper and I'm halfway through my handle of morning vodka."
This guy won't get 209 at 210. He might not even get 200. This isn't the market maker front-running a customer. It's a liquidity provider protecting his book and bottom line. This adversarial relationship is efficient - it keeps markets from getting too clubby.
There are valid critiques against HFT. (My pet is that HFT has no obligation to continue providing liquidity in adverse market conditions. This means they can pull out when the seas get rough, i.e. precisely when liquidity is needed. Traditional market makers cannot do that.) "Front-running" is not one of them.