Ok, I started off by comparing an engine to an air pump so, let's dig a little deeper...
Porting & Polishing
There is a simple explanation but, in my usual form, I'm going for the long road
When Airbus were developing their A380, test showed that a twin vortex was produced at the tips of the wings, which produces turbulence, causing the plane to be unstable in flight; the only solution they could find was to extend the wings, making them extremely long & disproportional to the rest of the plane... until they observed an eagle in flight at close range; they noticed that, when gliding, the tips of the eagles wings folded up...
When they applied this new knowledge to the planes wings, they realised they could make the wings
shorter than originally designed, negate the turbulence & keep the plane airbourne much easier...
The key there is
turbulence! Have you ever seen the inside surface of an engines intake & exhaust ports? Heads are "rough cast" which is exactly that,
rough! We all know that a smooth surface (like glass) has little surface resistance but, the rougher a surface gets, the more resistance it has...
In a wind tunnel, a sheet of glass will produce an almost perfect flow whereas, a sheet of 24grit sandpaper (just for example, you wouldn't actually do it) will break up the flow to an unrecognisable state. The question is
why? & the answer is simple...
When the wind hits the high grit points, it can't flow naturally & creates a vortex, which creates turbulence; do that a few hundred times, then bounce every vortex into one another & you quickly have a big mess...
That exact same thing is happening in your engines ports; the air is bouncing off the rough cast marks & bouncing all over the place; by removing all the high points, you not only increase the size of the port, you reduce turbulence, creating a cleaner, more direct path for the air/fuel to flow &, therefore, make the engine more responsive, powerful & economical because the air can flow much faster...
Which, of course, leads back to