They often do, but they don't have to. You can write an uncovered call, if you're brave or stupid -- after all, worst case you'll just market buy the shares to deliver on the day the option is tendered.
Liquidity providers can always just write share IOUs and find the shares to fill them later. The market running out of stock is not a thing that can actually happen.