My favorite example of this: a MacBook's headphone socket has full support for iPhone earbuds. The little headset microphone is used and the volume/pause buttons operate exactly as on an iPhone.
Obvious in retrospect, but just another example of how Apple treats their product range as a complete ecosystem.
They are better than anyone else at that simply because nobody else really sees the whole product as their own problem. I.e. each hardware/software/service maker is just optimizing their part.