An apple top case replacement includes batteries… that isn’t a sensible repair solution. And manufacturing costs for the aluminum case + battery depending if it’s 13-16” version is around 40-60$~. While the display can easily cost above 200$ and the same for the M2 chips. The ram cost more than 100$ and the storage is likely close to 200$.An Apple top case includes the aluminum body, keyboard, trackpad, battery, speakers, and maybe ports (I'm not certain, and it may depend on the particular model); it does not include the logic board/motherboard, which can be replaced independently.
So as I said, all Apple is really getting back out of a top case replacement are smaller chips/controllers, cables, possibly antennas, and other random bits that they may or may not be able to reuse. The calculus is potentially different for logic board replacements, where you're probably better off going third-party if possible. And I wouldn't be surprised at all if Apple doesn't bother with board-level repairs, even at their dedicated facilities, and just sells them into the secondary market (though I have no idea).
Again, as much as you don't wait it to be true, repairs are not generating large profits for Apple.
I’m not saying Apple makes an enormous profit on it as that would depend on how they do things and we don’t have that info.
But taking in to account the cost of individual components(not full pieces such as display and motherboard) and the hourly wage for a technician, they are making a killing.
And you don’t become the wealthiest company in the world doing unprofitable business.
But the cost of the repairs they offer is ludicrously overpriced and self enforced limitations on themselves and others.