It's quite simple actually. All of the many PC makers are extremely competitive with each other, resulting in small margins. That means much of what you are paying for such a PC is actually paying for the product itself instead of being redirected away to vault #126 at Apple HQ.
On the other hand, Apple is an island, the LONE maker of Apple stuff with no competitors making any kind of Apple product clones. As such, Apple's margin is nearing 50%, growing there from the long-term (sky high) goal of 38%-40% throughout this inflation/covid/supply chain period.
At 50%, half of every dollar you give them is not buying the product or all of the stuff related to making the product, marketing the product, etc. Instead, almost a full half of each dollar paid flows off to the vaults... much like the "30% right off the top" with apps in the Apple App Store aren't paying the developer or making the app.
PC maker margins are thin, so most of every dollar you spend on their products are actually paying for stuff in the product, making the product, marketing the product. As a result, you can get a tremendous amount of hardware value by buying a PC... which will also run far more software apps than available on Mac. PC basically rules the tech world while Mac is only a niche player.
Fans will beat it all down and let on like it's junk, etc, but I bought a little PC when Silicon basically ended "full Windows support" in the former Bootcamp and that PC has been performing just fine all this time. I didn't buy this cheap but opted to spend an Apple-like budget on it. I spent less than Apple charges for only the 8TB SSD upgrade in a Mac (not including the Mac itself) and got a fairly loaded
gaming PC with 32GB of RAM and 10TB of fast SSD. That's
VALUE!
If you want good value for your money, buy a PC. If you want Apple, you have to pay a hefty premium and be satisfied with whatever the one seller chooses to provide.
Personally (and objectively), I don't see one as significantly better than the other- just different. I lean Mac but certainly enjoy many benefits of that PC not available on Mac. I miss when key parts of Mac like SSD and RAM could be purchased at PC-driven competitive rates instead of from the lone company store at 3X-5X market rates. We gained some nice "brains" with Silicon but lost the whole competitive-driven pricing for 'the rest' at the
same time.
But hey, Apple is now richest in the world and for many of us, that's seemingly all that matters.