There was talk on Twitter during the height of this of inscriptions bypassing the public mempool and going straight to certain miners. I can't find it with quick googling, but miners are always free to choose which transactions they include in the blocks they are mining
They choose transactions to include before they attempt mine a block. Then after they successfully mine a block (which is rare) those transactions become a part of the ledger. Usually they take the transcations from public mempool that contains transactions waiting to be confirmed. But in theory miners could include the transactions that were never put in the mempool. Although they would need to have a significant portion of global hashrate to mine such blocks at any sensible rate, not just very occasionally.