Why Do Market Makers Prefer to Trade at the Bid or Ask Rather than the Mid-Price?
Market makers profit by capturing the bid-ask spread. They aim to buy at the bid and sell at the ask, collecting the difference.
Trading at the mid-price would eliminate their profit margin from the spread. They only execute at the mid-price when forced to by internalizing an order or in a dark pool setting, but their primary goal is to provide liquidity at the bid/ask to capture the spread, which is their compensation for taking on risk.