Most bikes are designed with a specific handlebar type in mind because each style of handlebar offers different handling characteristics and sizing constraints. These days there are so many shapes of handlebars, but they generally fall into a few distinct categories that can be used to classify a bikes intended configuration to handle as the designer intended.
Types of Bicycle Handlebars
Popular for road cycling but also popular for more aggressive, fast paced riding on mixed terrain.
Any flat or flat-ish bar with a sweep up to 35ish degrees.
Swept Back Bar
Any swept back bar with a sweep of 45ish degrees or more. Bikes designed for these bars tend to have more aggressive (longer) designs to accommodate the riders hand position being further back.
Bars that extend out forward and allow an aerodynamic, stretched out position with full forearms resting on the bars. These are popular for triathlon and time trial uses.
Inspired by moto bars, these are often used for klunker and mountain bikes to give a wide, upright handling. The design is similar to BMX in looks with most including a cross bar and 22.2 clamp diameter, but are generally wider and with only about 4" of rise.
Bars designed for BMX use and with a 22.2 clamp diameter. These often have much more rise than moto/klunker/riser bars.
Bar Type and The Upright/Aggressive Scale
The Upright/Aggressive scale is based on the design trends of bikes within its category. Because bar type is a key consideration in a bikes design, if a bike has a different bar than others in its category, its upright/aggressive designation may not properly reflect its design.