Handlebar shape, angle, width, reach, drop, sweep, width, etc., is optimal when hand interface is anatomically correct with regards to differential, shoulder width and drop, elbow and wrist angles.
Mountain Bike Handlebars:
Hand/wrist/forearm angles are impacted primarily by handlebar sweep (rearwards and upwards), width, and componentry locations. To approximate correct sweep, bend forward and let your arms move medial/lateral with relaxed wrists. Note knuckle angle, wrist rotation, and hand to forearm alignment at different widths and use this as a starting point when shopping bars.
Next, with MTB in a trainer, pedal sitting upright on the saddle (no hands) with your eyes closed. Reach for bars, without looking, and observe placement. Are they similar to the current setup or more like the extension-test? Refine by removing the controls, grips, and rotating the bar. The final adjustments will reflect minimal hand discoloration (white=restricted blood flow), maximum contact, and natural wrist angles. Controls should be easy to reach and use without modifying [optimal] hand placement. Inspect and compare hand to forearm angles when on grips and at controls. Adjust the shifters/brake-levers to allow easy transition when under load, riding. Adjust brake-reach and shifter angles (if separate) for maximum hand/grip contact and access under load.
Road Bike Handlebars:
Hand/wrist/forearm angels are impacted primarily by handlebar width, brake hood placement, drop, reach, bend, and sweep.
Handlebar width is more complex than matching to shoulder distance (various landmarks), because hip flexion alters musculoskeletal function and spine angles that impact the shoulder/thoracic interface.
A better approach is to observe hand placement at the hoods. I like to see hoods aligned with a rider’s forearm. This tends to reduce wrist strain and unnecessary muscle recruitment from hands, shoulders, neck and back. If i observe hands/thumbs roll towards stem – bars too wide; hands/thumbs roll away – too narrow.
Comfortable hood placement varies, but a smooth continuum between bar and shifter is usually a good beginning.
Handlebar drop and reach should accomodate unrestricted breathing and proper weight distribution, within the constraints of a cyclist’s flexibility/extension.
Triathlon and Time Trial Handlebars:
Tri/TT handlebars come in a variety of designs, with the same basic features: A Base Bar, Extensions, and Arm Pads.
There are a few models designed specifically for road bikes, but most fitters would argue that it is impossible to optimise both road and tt positions on the same bike. The problem is not just a reach issue. Tri/tt frames have more aggressive seat-tube angles, which moves the weight forward on the bike. This weight is managed by having your forearms on the aero-pads to support the trunk. Riding this geometry on a road bike would typically wreak havoc on the wrists, arms, shoulders, and upper-back. Conversey, road bike geometry promotes less upper body tension by shifting center of gravity further behind the bottom bracket. This position reduces the closed hip angle, which is not conducive to running effectively off-bike.
Brand preference is less important than fit and discipline. The triathlete elbow position is typically wider than traditional TT, because they are “pumped-up” from swimming and need to relax for running. The Time Trial position tends to have a closer elbow position, though there are certainly trends where the pads are wider with arms extending straight for similar aerodynamics.