Software support is an important one, and Apple has managed to slow down the RAM baseline inflation that Android seems to experience every other year. Even people who regularly upgrade usually trade in their old phones because they still have enough value to bother, so a lot more phones get used all the way to the end of their support.