Current generation F1 engines for example, are limited to just 1.6L (97 cubic inch) displacement, and teams are not allowed to refuel during the race. This forces engineers to design more efficient engines (less fuel equals less weight). Last season's cars were reported to achieve over 50% thermal efficiency (compared to ~20% for a regular road-going car) and close to 1000hp.
Whether this technology actually trickles down to production vehicles is debatable. But traditionally racing has been the incentive for major advances to be made in efficiency, aerodynamics, drivetrain components, tyres etc.