I've seen many cases where a mass-production line was converted into a service-parts line. Usually it involves cutting out a whole bunch of automated assembly operations and keeping only the critical fabrication and assembly tooling (and relocating what's left of it from the main production plant to a dark corner somewhere), and then having parts inserted and fasteners tightened etc manually instead of by automation. Where a steel tube was bent by a dedicated custom bending machine before, it's now bent on a CNC that isn't dedicated to any one part shape. The service-parts line runs maybe one shift a month or whatever, and the rest of the time it sits there occupying space in the corner. As long as they're making money by selling service parts, they'll run it now and again. Eventually there's a final parts run and they stash all those parts in a warehouse somewhere, and scrap what's left of the machine ... the space that it occupies becomes worth more than what it's worth to keep it around. Then, when those inventory parts run out ... that's it. Discontinued. Or, when the sales rate drops so low that it isn't even worth keeping the warehouse space, they scrap what's left of the inventory and the parts are discontinued.
Parts that aren't part of routine maintenance or collision repair go obsolete sooner than you would think. Crash damage that gets into firewall and floor and roof-pillar structures results in cars being written off, not repaired, so there's no point keeping those parts in production.
Certain very lucky models become classics, and the aftermarket takes over for potentially decades. I believe you can make an entire 1967 Camaro from aftermarket parts; you might have to compromise on the appearance-of-originality of only a few non-core components. Some of the old GM and Ford pickup trucks from that time period come pretty close. That is not happening for a '73 Buick Apollo despite it being a newer car.