Example: NYSE order book
100,000 shares offered $10.02
100,000 shares offered $10.00 (quote)
NASDAQ order book
100,000 shares offered $10.01 (quote)
You send a "buy 200,000 shares $10.02 limit" order to the NYSE.
The NYSE is REQUIRED to route 100,000 shares away to NASDAQ@$10.01, rather than filling the extra 100,000 at $10.02.
An HFT intercepts the trade, buys the 100,000 at NASDAQ @$10.01 ahead of you, and also can buy the 100,000@$10.02 at NYSE ahead of you. Now you have to pay $10.03 to buy the remaining 100,000 shares.