The first category is people getting lucky playing around with circuits, or happening to have a new-but-smart person doing their development. Most cheap pedals are cheap from development all the way to production, and it shows in most of them being mediocre.
The second is because they’re slight variations on standard, proven circuits that have been around for decades, and the only way to charge a reasonable amount for something like that is to add some bells and whistles (which is dumb cheap and easy from a development and production standpoint - it’s usually a couple of resistors/diodes and a switch or knob).
The last is because they’re digital at the core, and someone very smart, very patient and very hard working spend a fuckload of time figuring out how to do something new and cool in code and then adopt it to a teensy chip (which is a very limited skill set). Because it’s not easy and they did it first, they can charge a king’s ransom for it (I’m looking at you, Strymon).