cam selection involves careful consideration on both the intake (inlet) and exhaust (outlet) side. In an ideal situation, the exhaust system flow charactaristics are tuned to the valve events as are the intake valve events.
The exhaust has the capability of positively affecting cylinder fill. If the timing is right, there is not a lot of "pull" or "signal" on the opening intake valve as the piston is near TDC and piston speed is very low - no draw. If the ehaust system is designed correctly, it still has mass moving down the system and draws a vacuum or once again "signal" on the chamber. Since the cylinder volume is small, the vacuum the exhaust gass creates, (which is not great in relative terms to CID) is still very effective in getting the intake air moving to start sweeping fresh air into the cylinder. At some point, the piston starts to move at greater speed and the ability of the exhaust system to exert much effective gas movement on the intake port is lost, but that's OK as the piton is now moving the air.
If you vary from ideal by restricting the exhaust, the cylinder is not completely empty and some burned gasses remain in the chamber as the exhaust valve closes which dilutes or displaces fresh feul and air and power will be diminished. If the exhaust system overscavanges and/or injector timing is not right, some of injected fuel unburned may be drawn into the exhaust and power will be diminished - this is much more of a problem on carb cars where fuel is always suspended in the air charge.
On the intake side, if you open the intake valve too soon, exhaust gasses will be blown back out the intake valve in what is called "reversion". It is sucked back into the chamber as the piston continues on it journey, but that is a waste of time and the ability to get fresh air into the chamber. Open the intake too late and you inhibit the ability of the cylinder to fill based soley on the time you have to do it.
Now consider that the ideal valve events and system design paramters will need to vary with rpm and you get a feel for why you pay a good cam desinger for the benefit of his knowledge and services.