It's because they have to milk lightning for as long as possible. Additionally switching the connectors is not as simple as jamming a new part into the existing model. They have to re-do the moldings, PCBs and other parts, it is extremely expensive and time consuming to swap a connector out.It's hard for me to understand why it takes them so long to offer a USB-C version of the regular Airpods. I was in the market for a pair now, but simply ended up buying something else. I have an iPhone 15 Pro, so really didn't want to get the old Lightning ones, and also didn't want to pay for the Airpods Pro (which are really expensive in my country).
Same with the keyboard and mouse, why is it taking them years and years to change the ports? USB-C versions for all accessories should have been available the instant they released the new macs / iphones with USB-C ports.
If Apple had not been so stubborn & greedy though they would have switched to USB-C several years ago. Other than being 1mm thinner lightning has pretty much zero advantages of USB-C and tons of disadvantages.