That being said if I was trying to see it from Apple’s perspective, it does address a lot of problems pretty easily: thieves breaking devices down for parts or coercing users, customers having issues with their devices due to low quality repairs, users buying second hand phones with unofficial parts, various security concerns, etc. Apple do also sell old and refurbished devices also.
That being said, I do think Apple should be solving this in a way that allows unofficial repairs, even if that involves taking your ID and proof of purchase into an Apple Store to get your device “unlocked” for free so you can do whatever you want with it, knowing it may hurt the resale value and impact the device’s security. More than that, I think it should be legally required under right to repair legislation.
In my experience AppleCare repairs are stellar because they're never actually repairs. I've never once had them repair a phone/laptop/etc. Every single time they're like here's a new/refurb instance of the same phone(not that I'm complaining!). I'm hoping they're eventually refurbing the old one and reselling it, but I suspect they're often just tossed(ahem "recycled").