The mid-2012 MacBook Pro was the last with an optical drive, and it is finally considered obsolete by Apple.
Apple maintains a vintage and obsolete product list that updates based on how long it has been since a product was for sale. Some vintage products may be eligible for service, while obsolete products are not.
Devices in the vintage list haven’t been for sale for at least five years. Obsolete products haven’t been for sale for seven years.
Some regions like France have special requirements for products sold. Owners of iPhones or Macs purchased in 2021 or later can obtain service and parts from Apple or service providers for seven years after the date the product model was last supplied by Apple.
Obsolete products lose their ability to be serviced with one exception. MacBooks may be eligible for an extended battery-only repair period for up to 10 years from when the product was last distributed for sale.
The optical drive was ditched amidst the Jony Ive era of ever encroaching thinness. An external optical drive called the SuperDrive is still available, but connects over USB-A and is a relic itself.