Because 7 years from now, my iPhone will still have the latest OS and security updates. I also have the budget iPhone 16e. I also haven't broken a phone since I was 16. Not like cheap androids that are often abandonware by the device maker before they even hit the shelves.
It sucks. I wish that would change, but that is what made me switch from Android to iPhone after 12 years on Android. At the time, even flagship androids were lucky to get 2 years of OS updates and security fixes. Apparently Google and Samsung are going to support their devices longer, but I'll wait till they have a track record. But ultimately, an iPhone for me does come out cheaper over the lifetime of a device than cycling through cheap androids every 2 years.
I had to upgrade my 2021 iPad 9gen to a newer model to actually make is reasonably usable.
So I am not sure about recent track record for Apple.
My 2021 Pixel 6 works well for my mother and is getting updates.