In a heavily traded stock, buyers will typically be matched with sellers. If no sell order exists at that moment, the buy order may be filled by a market maker, who provides liquidity to the markets.
Market makers are not adding liquidity out of the kindness of their hearts. They are providing liquidity because they are able to make money buying on or near their Bid and flipping those shares for a profit by selling at or near their Ask. When a retail order to Buy or Sell cuts into the market maker Bid/Ask spread, that retail order becomes the Best Bid or Offer (Ask) and may be matched with another retail order.
The same process holds true in options, but with some key differences. A very liquid and actively traded options contract may see retail order flow being matched within the Bid/Ask spread. But with so many different strikes across multiple expiration dates, liquidity in individual options contracts is typically nowhere near as high as that of the underlying stock.
Therefore, market makers are responsible for a large portion of options order fills.
However, unlike a stock where a market maker could buy 100 shares on their Bid, and sell that 100 shares on their Ask and have no positions, market makers in options often don't have the luxury of seamlessly matching positions on their books and eliminating risk. In addition, with so many individual options contracts to make markets on, what is shown on the Bid/Ask may not necessarily be the only price at which a market maker is willing to trade. They may be willing to buy or sell inside the Bid/Ask based on calculation of 'edge' they could receive for making that trade. That edge calculation is based on the option order's price versus the market maker's calculation of 'fair value' for that contract. (Put simply, if the market maker has an option priced at 1.05 fair value, filling an order with a 1.15 limit bid would give them 10c of edge).
Many spread orders are executed on something called the Complex Order Book (COB). Simply put, the COB is where market makers can see multi-leg orders and determine if there's enough edge to execute that order. (When we say "see" we are generally referring to a computer algorithm 'seeing' the order and deciding to fill or not fill).
One thing that makes the COB for multi-leg option orders unique is that there is no public Bid/Ask. As traders, the best we can do is to calculate an implied Bid/Ask spread from the NBBO (Best Bid/Offer) of each individual option contract or 'leg'. However, unlike with individual options contracts or stocks, no market maker is required to guarantee an order fill at this 'implied NBBO'. Therefore, not only are Bid/Ask spreads on multi-leg option orders typically wider than those on individual options contracts, but we can lack transparency on where liquidity can be found.
Liquidity is found and multi-leg orders will be filled when either there is a matching order already on the COB (unlikely) or when a Market Maker determines that there is sufficient 'edge' to take the position onto their books. This can often mean that a multi-leg options order may potentially be filled inside of the implied NBBO (giving the opportunity for price improvement for the trader), but it can also mean that occasionally it doesn't get filled, even on the implied Bid or Ask.
This lack of transparency can heighten the need for orders to be 'worked' whether it be to enjoy price improvement or simply uncover true liquidity and pricing. By 'working' an order we mean placing an order at a limit price where we would hope to be filled (perhaps at or near to the 'mid' of the prevailing Bid/Ask) and walking that price up (if buying) or down (if selling) to ultimately find the point at which the order is actually filled.