Sometimes, and it depends, but far more so than others in my experience.
Perhaps most famously, when Nvidia manufactured defective GPUs, Apple launched a repair program at their own expense [1], and IIRC the fallout from this is what (at least somewhat) led to the severance of ties between Apple and NVIDIA.
I’ve had multiple cases of bad GPUs, bad batteries and the like, and while Apple has denied me service before, they’ve repaired or replaced far more as a percentage than any other computer manufacturer I’ve dealt with.
[1] https://www.macrumors.com/2015/02/19/2011-macbook-pro-repair...