I've got a mid-2007 iMac I'm still using. Great build quality. Unfortunately the latest macs seem gimmicky - thin iMacs and touchbar MacBooks etc.
Apple aims at planned obsolescence. Those 2007 Macs are still reliable (I have one) but you can't upgrade to the latest OS, so you miss security patches... Same for IOS devices.