> Plenty of iPhones had only 3 years of support, and same with Android phones. At least do an apples to apples comparison (pun intended).
That's a bold claim. Only two models were end-of-lifed after less than 3 years. One more after less than 4 (3y, 11m). The rest had at least 4 years.
https://en.wikipedia.org/wiki/IPhone
According to this, from the 3GS to the 5C, most had 4 years (or very close) of support. Two models approached 5 years (4y, 10m and 4y, 11m).
Everything from the 5S forward is still supported, and the 5S has 4 years and 11 months of support now.
If you failed math, you might include the iPhone X in your numbers and its 10 months of support would bring the average down. However, that's 10 months of support so far, it's not end-of-lifed yet.
The 5C is an outlier amongst the earlier models, but it makes sense. It was the same hardware as 5 but a different case, and released a year later. So the 1 less year of support is reasonable (if it were supported another year, the 5 would have been as well).
For grins:
The first 7 iPhone models had an average support period of 47 months.
If you include the next 7 models (all still supported) it brings the average down to just shy of 39 months.
If you consider that each of those 7 will get another 12 months of support from today, minimum: This time next year (excluding this year's models) they will have received almost 45 months of support, on average.