A road cycling race involves a pack or "peloton" of riders. In the pack the riders are using group tactics and drafting to their advantage. Triathlon events and Time Trials are competed against the clock in which drafting other riders is forbidden. Aerobars allow an individual to maintain an aerodynamic position.
I recently had one of our coached athletes ask me a question that comes up regularly:
"Today you mentioned three things about the bike: aero, power and weight. I’ve wondered why triathletes are the only ones to use aerobars… we don’t see it in Tour de France or with other riders. Why? If the bars provided an advantage wouldn’t everyone use them?"
Short Answer: Road cycling races involve a 'pack' of riders, who are using group tactics and drafting to their advantage. A slightly more upright position and wider hand position helps with overall stability and visibility. Triathlon events are individual races competed against the clock, in which drafting off other riders is not allowed and the less stable position inherit to the aero-position is not a particular issue because you're not shoulder-to-shoulder and wheel-to-wheel with other riders.
Long Answer: Aerobars were designed in the early 1980's and initially struggled to gain acceptance in the road cycling scene which was dominate at the time. Road cycling is suppose to be about the rider, not his/her equipment, and the UCI (road cycling International governing body) has a extensive rule book that limits how 'modified' a bike can be and still be considered legal for road cycling events. If you follow Nascar you'll see many similarities: the cars are very similar, so that the winner is usually the best driver, not the person with the most exotic equipment.
Triathletes of the early 1980's realized aerobars allowed them to maintain faster speeds, and began using them in races. They quickly became prevalent throughout the elite triathlon ranks. Triathlon being a relatively new sport at the time did not have a rich history of tradition, nor did the sport have rules that dictated what type of bike could be used in races. And so aerobars became the norm and still are today.
Triathlon bikes are used in road cycling events- but are limited to Time Trials. If road racers were able to use triathlon bikes during their road racing events they would most certainly average higher speeds, but at the sacrifice of safety to the riders around them. Aerobars can be considered less safe for a few reasons: mostly because your hands are not on the brakes while riding in the aerobars. It also takes more practice and skill to maintain a straight line in the aerobars (especially in cross winds) due to how close your arms are together. And so during the traditional road bike races the riders are only allowed to use tradition road bikes. With that said, you may notice that many road bikes now have the aerodynamic tube shapes of triathlon bikes (they're essentially triathlon frames built around road bike geometry and the road handlebar). This is called an aero-road bike, and is a nod towards how important aerodynamics is even during a draft-legal event like road bike racing.
A source of confusion to many people is the difference between a "TT Bike" (aka Time Trial Bike) and a Triathlon Bike. Along the spirit of the UCI trying to control bicycle design to level the playing field, the UCI has limitations on how aerodynamic a bike can be that is used in time trial events. The rules for triathlon are not as restrictive, and so you see more extreme frame designs and body positions. For raw speed the position and bikes you see triathletes use are the best way to go. Some people will ask "why do time trialist often clock faster times than triathletes if the triathletes use faster equipment and better body position?" The answer goes back to my initial comments on power, aero, and weight. Power will almost always trump any other factor, and the bottom line is that most road cyclists produce more power on the bike than triathletes because they're riding their bikes X-hrs per week and training specifically to improve their cycling ability, while triathletes have to split their time between swimming/biking/running.