If you need a PC, as in a desktop or a generic server, by all means buy a PC.
If you need a ton of fast and sophisticated GPIO, small size, light weight. passive cooling, battery-powered operation, a PC starts looking a bit problematic. That's where an RPi fits in.
I don't know, all my use cases where I needed GPIO are better satisfied by an ESP32. If I need more compute, I connect the ESP32 to my server via the internet.
Makes sense for many applications. But what if you are building an autonomous flying drone? That's the kind of application at which RPi shines, to my mind.
(Otherwise, indeed, an ESP32 has rather adequate amounts of compute and RAM for many control applications.)
Unless it processes images on the fly to do some sort of image-based steering or target recognition, an Arduino or comparable microcontroller should be beefy enough [1].
In mobile applications, power consumption of a RPi quickly becomes an issue.
Yes, an autonomous drone would have to process images, height data, map data, etc, so the compute of an RPi would still be relevant. Also, the drone does not have to max out the CPU all the time, it just may need intense compute in some situations, say, depending on the terrain. Larger drones, such as delivery drones, have motors with power consumption that dwarfs that of an RPi. For a a small, palm-sized drone it's of course untenable.
If you need a ton of fast and sophisticated GPIO, small size, light weight. passive cooling, battery-powered operation, a PC starts looking a bit problematic. That's where an RPi fits in.