It all comes down to the rpm that these engines run at. But that breaks down into two parts.
One, yes F1 engines are built using top grade materials and countless hours of tooling to make sure everything is just so. thats what allows these engines to turn the speeds they do.
Part two is the benifits of those revolutions. F1 engines arent big, 2.4 liters as someone said earlier. bottom line, you can only squeze so much air and fuel into a certain area. This is moreso true when you consider that these engines are naturaly asperated which means that they only have the force of the ambient presure to move air into the cylinders. typicaly speaking the torque curve is relative to the amount of fuel and air being ingested. torque is raw force, the bigger explosion you have the more torque you have, but hp is a measure of both torque and inertia. the inertial force of the rotating masses in the engine contribute to the overall output of the engine just the same way a brick hitting the ground at 100 mph has more force than one hitting at 20 mph. Think of torque as the weight of the brick, and the speed it's falling at as the engines rpm. using the figures you gave, an engine producing 1000 hp at 20,000 rpm is only producing about 260 ft-lbs of torque at 20,000 rpm. Thats just 260 ft-lbs worth of fuel and air being fed into the cylinders. looking at that figure, getting that much power out of a 2.4 liter seems much more feasable.