Not only that. In street cars, there are a lot of issues regarding the number of gears. In every gear box, there is a gear ratio for each gear. Along with the final differential ratio and considering the engine power output and its torque curve and powerband, a manufacturer determines what is needed for suitable use.
Let's say a car reaches it's maximum speed in 5th gear, at 6,500 RPM. A 6th gear isn't needed for speed, but can be useful for reducing consumption in road.
Considering the multiplier involved in each gear, and the fact that a car needs very few HP to maintain an average speed of 90 MPH, it's very useful to have an "extra" final gear for road use, while the others can be efficient for performance purposes. This has a lot more meaning along the tendency of downsizing that's going on nowadays.
In race cars, I assume it's the same logic, but leaning to the performance side of things.
Someone please correct me if I'm wrong.
Peace.