Filling of Market Orders

It is my understanding that the Market Maker makes the spread by filling sell Market Orders at the bid price by himself, i.e., by buying at the bid price (and selling at the ask price).

But when a sell Market Order arrives, there is always already at least one (limit) order at the bid price on the Book, the one with the highest bid price, since this is how the bid price gets determined.

Upon arrival of a Market Order to sell, does the client’s bid-price Limit Order take precedence over the MM “right” to earn the spread? Which order gets executed first, that of a client that has put a Limit Order at the bid price, or the one of the MM himself?

To put it yet another way, does the MM have to enter their own orders onto the Book, just like everybody else?

Many thanks in advance for your help.