How does cid make power?

I get and agree with what you stated here, My original question was very ambiguous, what I was getting at most say added cid equals added hp 100% of the time, My question is what's stopping the lesser cid from spinning up displacing similar air to make similar hp with same/similar top end parts. Like eg.. 318 vs 360 360 vs 408 400 vs 500 even 289 vs 396 etc..
Boils down to how much do you want to spend. A F1 engine develops, depending on the period rules, 750 to 1,000HP but torque is not that much. You have say a 3.0L engine reving to 12,000+ RPM. These engines cost $100,000+. Nascar engines are running 900+HP at 9500RPM but cost $50,000. RPM is expensive due to the high precission parts required and fairly regular maintenance required. A larger displacement engine turning slower will be lower cost and generally more reliable.
Larger displacement is no guarantee of more HP. The engine combination is to be considered. The cam and possibly the valve sizes may need to be changed as well. There is an aweful lot to consider, especially your ambiguous post. With engine building there is no simple answer to coming up with a workable combination. What works for me may not be right for you, and probably not in the same ball park for Rat.