It is the same bet they have made repeatedly with their phones. Smaller sim card (obsoleting old approaches) - removing headphone jack, switching to lighting, doing totally sealed (but durable) devices etc.
It's generally paid off - oddly people seem to prefer used apple products (ie, beleive in their durability) over used logitech headphones or android phones - so the actual life of apple products ends up being pretty long.
Apple's battery service fee is $49 for airpods and useful life is perhaps around 3 years, if you keep wanting to replace the batteries every three years. My quick sense is that most folks may retire their airpods after the second battery (6 years in) at the longer end.
So far their approach has paid of tremendously for them.
I am curious what other headphone providers are doing here. Ie, how easy is it to get a fresh set of batteries after 3 years that are of high quality and replace them. I've gotten burned replacing batteries in products with amazon replacements and the mfg sometimes doesn't even stock or sell new batteries for their devices so I've gone with Apple for now - if you go into their store for a new battery I've never had a problem with quality.