There are various reasons why a market type order may receive an execution at a price not within the displayed Bid/Ask. The most common reason is that the account has not subscribed to any real time Market Data and you are looking at delayed quotes. You can enter orders without subscribing to IBKR's market data, but executions occur at the exchange in real time.
Another possibility is that a stock or option trade may have been reported to Time and Sales as an "Exempt" execution (for example, as part of a combo Spread, Average Price Trade, R6 Trade Thru, IS Inter-market Sweep or a Broker-to-Broker execution) and your order may not be entitled to trade with those reported trades.
If your order is an Odd Lot the order can trade outside the disseminated Bid/Ask, which is for standard lot size orders.
If your market/marketable order was submitted during a time when there is a spike in the order flow to the exchanges, please note that orders are filled on a time and price priority and all marketable orders submitted ahead of your order will be filled first.
If you want to have our Trade Issues Group review an order, please feel free to contact IBKR and provide an order ID or the order details with an exact time from Time and Sales.