Most Costco-specific products, sold under their Kirkland brand, are pretty good. They're always a good value and they're sometimes are among the best in class separate from cost.
I think Apple's products improved when they started designing their own silicon chips for phones, then tablets, then laptops and desktops. I have beef with their operating systems but there's no question that they're better able to squeeze battery life out of their hardware because of that tight control.
In the restaurant world, there are plenty of examples of a restaurant having a better product because they make something in house: sauces, breads, butchery, pickling, desserts, etc. There are counterexamples, too, but sometimes that kind of vertical integration can result in a better end product.
Apple supports its devices for a lot longer than most OEMs after release (minimum 5 years since being available for sale from Apple, which might be 2 years of sales), but the impact of dropped support is much more pronounced, as you note. Apple usually announces obsolescence 2 years after support ends, too, and stop selling parts and repair manuals, except a few batteries supported to the 10 year mark. On the software/OS side, that usually means OS upgrades for 5-7 years, then 2 more years of security updates, for a total of 7-9 years of keeping a device reasonably up to date.
So if you're holding onto a 5-year-old laptop, Apple support tends to be much better than a 5-year-old laptop from a Windows OEM (especially with Windows 11 upgrade requirements failing to support some devices that were on sale at the time of Windows 11's release).
But if you've got a 10-year-old Apple laptop, it's harder to use normally than a 10-year-old Windows laptop.
Also, don't use the Apple store for software on your laptop. Use a reasonable package manager like homebrew that doesn't have the problems you describe. Or go find a mirror that hosts old MacOS packages and install it yourself.