Today, the question is primarily answered by the budget. If you are demanding and looking for a state-of-the-art racing bike, there are hardly any alternatives to electronic shifting: the leading suppliers Shimano and SRAM rely exclusively on servomotors and radio signals instead of the classic Bowden cable for the three upper quality levels.
There is currently a large technological and price gap between both manufacturers and the remaining mechanically actuated shifting systems, because apparently only remaining stocks of the mechanical eleven-speed Shimano Ultegra and 105 groupsets, which are officially still in the programme of some bike manufacturers, are still being sold.
E-shifters have clear advantages for the user: shifting gears at the touch of a button is far more convenient than using mechanical levers. The gears change reliably, and the front derailleur in particular changes chainrings at lightning speed and foolproof. In addition, no Bowden cable wears out - once correctly adjusted, the gears work with lasting precision.
Electronic transmission is particularly useful on modern bikes with cables hidden in the handlebars, because Bowden cables develop a lot of friction when they are routed at an angle. Even intensive rides in the rain don't affect the gears, and the batteries last a comfortably long time, from several hundred kilometres (SRAM) to several thousand kilometres (Shimano and Campagnolo).
The systems can also be customised using the associated apps. For example, the front derailleur automatically changes the chainring when required, the button assignments can be customised and, in some cases, bike computers can also be operated. The apps also include various evaluation functions (how long was which gear used?).
Optionally available additional shifters can be mounted in almost any position on the handlebars. The wireless transmission of the road bike drivetrain - complete with SRAM and between the grips and rear derailleur with Shimano - avoids complicated cable routing.
In addition to the lower prices, mechanical circuits also have advantages. Their mode of operation is transparent, defects are rare and can be rectified quickly. Only Campagnolo still offers high-quality groupsets without electronics; however, some high-end bikes are no longer designed for the installation of shifter cables.
The basic functions - shifting and braking - are all very good, there are no malfunctioning parts. The differences between expensive and cheaper groupsets are similar for all competitors: More expensive groupsets are lighter because higher quality material is used.
The top versions of all three manufacturers weigh around 2400 grams with all parts (with disc brakes), but also cost between 3000 and 4000 euros. An inexpensive groupset can be up to one kilogram heavier, but also several thousand euros cheaper. The latest technologies can also only be found in the expensive groupsets: electronic shifting, integrated power measurement or the latest detailed improvements in shifting and braking behaviour are only available in the expensive top groupsets.
DisadvantageThe follow-up costs are also higher because wear and spare parts are more expensive.
If you want to save money, you first and foremost have to accept a higher weight. If you also do without the advantages of electric gears and the twelfth sprocket, you can easily halve the investment in a new bike. Even cheaper - but a little lighter - is the rim brake, although complete bikes with this technology are becoming increasingly rare.

Editor