As far as I have been able to tell, there is no difference in terms of functionality or practicality.
With many bicycle components, different manufacturers create their own standards purely to ensnare customers. All of the vintage brake levers I have seen use pear nipples, so I assume the barrel nipple came later, but I have no idea which manufacturer first designed a barrel-style lever.
Personally I just find it an unnecessary annoyance... you can't really say one is used for road bikes and the other for MTBs... the bar end levers on my road bikes take "MTB"-style barrel nipples. Plus I have an older MTB with V-brakes that's fitted with crosstop levers - those take pear nipples. It's just a chore having to double-check before you go and buy new cables.
Both kinds are trivial to install, and work just as well as each other once on the bike. Although one style may be more prone to mechanical failure than the other, I am sure that the points of failure for both are far beyond the serviceable life of the cable (i.e. it will have stretched, frayed, and rusted considerably by the time the nipple breaks off).
Thankfully I've never seen a third kind.