This is really a massively oversimplified example, but here goes.
When you buy and option either call or put you pay the premium, which is basically the income the market maker receives.
But now they are left with a contractual obligation to the buyer, if they buy a call and the underlying stock goes up, they are obligated to pay the profits or at expiry deliver the stock at the agreed call price.
To remove the obligation risk they will go and buy an amount of actual stock eg AMC if its an AMC call option to offset the options payable amount based on movements in the AMC share price.
And the same goes for puts, marker makers have short sell relief when it comes to hedging, at least they do in Australia, otherwise they will borrow stock and sell (if they can’t they wont execute the contract).
So moral of the story is it doesnt really matter where AMC closes at, because option market markers are protected (hedged)