I think it really depends on lots of factors.
For example, early G3 iMacs didn't have very good flyback transformers on the CRT and the monitor often died. Some G5 iMacs are particularly bad about capacitors not lasting, and some x86 iMacs have GPUs that overheat and fail.
To some people, the lack of current software support (with PPC iMacs, for example, and 32bit iMacs that no longer support the latest version of OS X) might be a deal killer.
Or maybe the hard drive dies (which isn't unusual 3-5 years in), and then the owner can't be bothered to change it themself (or they don't find it worth paying someone else to).
Or maybe the machine only meets your performance (or power usage) needs for so long until the new ones seem so much better you have to upgrade.
Or maybe the new iMac fits in the decor of their room better.
The 2 debatable items: Resale value and estimated age of operation...
The price difference you put into buying a Mac vs an equivalent PC is usually the price difference you get out when you go to resell them. In a $500 laptop vs $1200 mac laptop example, the mac laptop will probably be worth ~$5-600 more in 3 years lol.
Reasonable lifetime? I'd guess 3 years on laptops and 5 on desktops. By that, I mean the amount of time before you'd really be itching to get a new machine. On a desktop, you can replace the keyboard and mouse and wipe it clean and you're good as new. On a laptop, replacing the keyboard and trackpad is a bit more involved, and you either go through some measure of preservation (like a case, plastic stick-on covers, using it on a stand with external everything, etc), or you end up with a laptop that has obvious signs of wear after 3 years.
That, and because laptop chips tend to be lower power, they will get longer in the tooth faster. Different priorities! I can stick 16GB of ram and as many SSDs as I want into my ancient PowerMac G5. Aside from running lots of intel only stuff, it's still pretty competent everywhere else. Meanwhile, my PowerBook G4 is a real pain in the butt to use.