Train like you race, race like you train. Have aerobars on your bike? Better try 'em out in training before you attempt to get down in them during a race. Doing a race that'll take you longer than 90 minutes? Be sure you practice your nutrition strategy--both in terms of what you eat and when you eat--sometime before the big day. Planning to wear a sombrero for the Cinco de Mayo Splash 'n' Dash? Okay, maybe you don't need to do your training runs around town in a sombrero. That might earn you some strange looks. And heaven knows we don't need to give motorists any more excuses to try to run us off the roads.
Specificity is an important element of training for any sport. Every sport requires (in some measure) the basic elements of strength, speed, and endurance. So every serious, successful athlete trains all three, at least a little bit. I remember having to run a mile and a half in football conditioning (hated it). But we spent a lot more time lifting weights for football, because strength is way more important than endurance when you're only running far enough to hit the person directly across from you.
You could probably have figured this out on your own, but triathlon is primarily a sport of endurance. Hence long bikes, long runs, long swims. Coincidentally, of strength, speed, and endurance, the most effective training is to put endurance first, then strength, then speed. But that doesn't mean that triathletes never need to work on strength, or on speed.
If you've been doing this sport long enough to want to get better, you've been in it long enough to know you can go the distance. You've got the endurance to run a 10k or bike 50 miles or whatever the case may be. What you don't have is speed at those distances.
Here's where the specificity comes in. Let's say you want to be able to run a 10k in under 60 minutes. That's a pretty good goal, right? So you need to run 6.2 miles at a sub-10:00-minute pace. But you do all of your training runs at a pace of around 10:15/mile. Now there's definitely something to be said for race-day adrenaline, or whatever it is that allows us to outperform our best training at a big event. But if you can't do a 3-mile tempo run at 9:40 pace, what makes you think you're going to be able to go twice that far after swimming and biking for an hour?
It's been my experience that you get so comfortable with your long, steady pace when you're training endurance that it can be hard to shift out of that gear and into a speedier one. I started paying a little bit closer attention to my heart rate on training runs, and realized I wasn't getting my heart rate up quite as high as I was supposed to. I had built a really good base, had good endurance, and that had prompted better efficiency and less effort at my base-building pace. One day, during a mid-distance run (probably 6 miles), I decided to push a little bit to see what it would take to get my heart rate in the target zone. Ended up doing my six-mile run on about a 9:20 pace. I'd been doing all my runs right around 10:00. Had no idea I could hold 9:20 for 6 miles. After that, I was more willing and able to push on my runs, especially the long ones.