I've never had a PC that would last me more than 3 years. I got 10 years out of my first MacBook Pro, I have a MacBook 2016 still working great, and my iMac is from 2013, and while it still runs great, I may replace it with a new one to be able to run Monterey and be able to run the latest version of Xcode on it.
I may keep using it as a second monitor/server.
Counter-anecdote... I bought a Thinkpad X200 Tablet in 2008. It was used for about four years and then passed down to a friend. The friend bought something else and gave it back to me. I upgraded the internal drive to an SSD and maxed out the RAM and my nieces use it to this day. It runs Windows 10 without issue. You won't be playing the latest and greatest video games on it, but it performs surprisingly well for its age. It even holds a two hour charge on the original battery! It also has a TPM in it, so Windows 11 may even allow it. That thing is going to outlive us all.
I bought a Macbook Pro in 2012 (retina, woo!) and recently gave it to my mom. It's still going strong, but not receiving the latest OS updates. Still usable though.
I made the horrible mistake of "upgrading" from the 2012 to the mid-2018 Macbook Pro. That thing had a failed keyboard a few months in and then the battery exploded a little over a year later. I traded it in for a Mac Mini after that. No sense playing the 50 repairs game. (Mac Mini is fantastic, by the way. Upgraded the RAM to 64 GB with no hassle. What a world!)
Oh, I just remembered I have the family HP laptop in my closet. Just checked and it also still works! No way it would ever run Windows 10 though. It's running Windows ME, so it has to be from 2000 or 2001 (I think?). That thing got abused horribly. The screen has a tiny cut that bled and scabbed over, the keys are sticky, there's a chunk missing from the case around the fan, the power cable has to be inserted just right to work (funny that I still remember exactly how to do it), but it still works.
If we're counting non-laptops... the "family IBM PC clone" from 1989 still runs great! I played Gold Rush with my nieces on it a couple weeks ago, actually, after boring them with a discussion about the history of Sierra. They were, for some reason, not impressed. But the game still holds up! (The hard drive, however, did make several noises of protest. It's definitely not long for this world.)
I've assembled several computers over the years for myself and others and they all work fine, running the latest version of Windows 10. Even the computer my fake grandma bought us in 2005 still powers on and computes (I'm a hoarder, yes) but it doesn't run Windows 10 very well. (Or that was the case when I passed the X200 on. I assume it's still true, though.)
Point being, the only computer I've ever had fail in any way was that awful mid-2018 Macbook Pro. I don't think it speaks one way or another on the quality of the ecosystem in general. More luck of the draw and, on the PC side, choosing decent components or manufacturers.
... wow, this was a long and exceptionally boring and vaguely off-topic post. Congratulations to anybody who got here!