That system you linked to is an extremely poor example. It relies on an external power brick, is incredibly underpowered, only gives one PCIe lane to the M.2 slot limiting it to ~800MB/s according to their specs (meaning it's only PCIe gen3), and has only one SODIMM slot (meaning it's operating with just a 64-bit memory bus, half the bandwidth of mainstream consumer PCs).
It's basically a 12 year old PC shrunk into a tiny box and low power budget.
Sure, it's not on the same performance level but this isn't the only option. There is a wide range of options available in the same form factor. Here's something higher end: https://www.bosgamepc.com/products/bosgame-mini-pc-p3-amd-ry... Probably still uses an external power brick but I imagine that's just to reduce costs.
My point is that this size of device is already available with upgradability so the form factor isn't the issue. Apple is significantly better at engineering products than these random companies and they could surely have made this new Mac Mini upgradeable. I do understand why they wouldn't want to though!
It's basically a 12 year old PC shrunk into a tiny box and low power budget.