No one would claim that Apple sells at a loss. But, continuing support for six year old phones is solely motivated by service revenue - just like consoles.
No, because Macs are supported for even longer. And Mac App Store revenue is not even worth mentioning. (Literally, Apple has never mentioned it!)
The long period of support is because the devices are sold at a premium, and as premium. Price, quality, reputation, they all go hand in hand.
My Dell Core 2 Duo 2.66Ghz circa 2010 runs Windows 10. It has to, no one is willing to pay for operating system upgrades.
No one would claim that Apple sells at a loss. But, continuing support for six year old phones is solely motivated by service revenue - just like consoles.