Cable activated rim brakes are a very simple and mature technology, and work very well. They are also lightweight. But, they have downsides, in particular susceptible to grit, and rim wear. Also heating in certain conditions. Cable runs can also be problematic in some situations.
Hydraulic disc brakes seem to be preferable to mechanical cable activated disc brakes, I think due to responsiveness of the brakes. The hydraulic systems are also not constrained by tight angles, and can be run through the handlebar stem/headset, and around tight bends with internal routing.