Except the RPi is smaller, lighter, lower power and more efficient than most mini PCs. It also has a bunch of unique addon boards, many (most?) of which don't really use GPIOs, but a standard communication interface like PCIe/USB/serial/SPI/I2C.
No mini PC can beat most things about the Pi, apart from performance and compatibility, the latter of which is fully the fault of the manufacturer.
An arduino board with a esp32 added to it can do a lot of things(minus some cam/image recognition stuff) for half the price.
Rpi is strictly suited to very specific use cases.