Even market price trades still require a counterparty’s inverse order to execute the trade against. Thus the exchange that an order is routed to affects execution price because it depends on the available orders on the exchange, on both sides of the transaction: when and what price your order executed depends on both (e.g. if you are buying) orders placed by other buyers on the same exchange (higher bids will execute first) and the volume of sellers (if your buy order completely fills a sell order at a given price, the price will slip against you because your order will partially fill at the next higher priced sell order).
To avoid this effect one can use a limit order instead of a market order (you are setting the price instead of ‘taking’ the market price), but then it may take longer for your order to execute, and it may not execute at all if the price moves away from your limit price.