I always ran my best in races for a combination of reasons.
1. the competition, I never was setting out to run a specific time, always to compete.
2. You know this is the reason you're training for, there is no penalty for going to fast in a race compared to a workout where u need to hit a specific pace
3. Adrenaline
4. For some reason, even in workouts if I'm running with guys significantly faster than me I somehow can be pulled along to finish what is an easier run for them but tough for me, we're taking 16 milers at 6:40 (fast for me). So running in a pack can definitely help in general.