Let´s throw in another term; stoichiometric as thát is what
@Noelpolar is referring to.
The air to fuel ratio (AFR) is the mass ratio of air to fuel in a combustion process, crucial for determining theoretically ideal combustion efficiency (and emissions). For gasoline engines, the stoichiometric AFR is about 14.7:1, meaning 14.7 parts of air for every part of gasoline. Mind that is in weíght!!
Also bear in mind that this is under ideal mixing, ignition timing etc.
Obviously it is a complicated process with many variables. Take the ambient air pressure, the humidity and temperature which add up to the RAD or relative air density.
Modern fuel injected engines have all sorts of sensors to give the CPU input about the process. For the intake it is p.e. the MAF (mass air flow) sensor. This combined with a temperature sensor calculates how much fuel can be metered. Very recently humidity is sometimes metered too.
Back to the AFR it is sort of obvious that because of the variables and the requirement of emissions and fuel economy the current priority is on complete combustion of all the gasoline. This in effect means that there will be excess air which in its turn means that under most operation conditions more fuel could be burned. For max power therefore the mixture can be richer.
And there you have it. The difference between the OEM programs and after market programs; the different priorities; max. efficiency vs max power.
A caveat should be made concerning the catalist. The O2 sensor (aka lambda sensor) is part of a closed feed back loop telling the CPU about the result of the combustion. In effect the sensor in the exhaust register the combustion efficiency. This closed loop overrules all which means that the CPU will to a large extend correct any after market program when that goes outside of the parameters. Too far out of bounds will cause the CEL (check engine light) to be switched on.
Back to the R18 we should relaise that it is a naturally aspirated engine. This means that the air is flowing through because of pressure difference between the ambient air pressure and that in the inlet tract. ÁNY resistance in the inlet tract = pressure drop = less air = less fuel = less power. It is crucial to be aware that in an n.a. engine the ambient air pressure is the feed of it all. However much an engine sucks, there is only 1 bar on the outside. Period.
Now the real life crux: Noise regulations. The inlet needs incorporate mufflers. Those consist of restrictions to the sound waves, anavoidably also air flow.
The R18 having large capacity displacement at relatively low revs means that the pressure drops have spikes and the air mass has limited kinetic energy.
Dropping in a ´sports´air filter is only part of the story of the intake. The muffling is mostly in the trackt befóre the filter.
Ah.... take off the filter box lid! Again only marginal gains; the real restriction is in the access from the outside world; the openings in the housing. The main entry are the ´gills´ at the front but BMW have provided a sort of compensator with the cable entry at the top and by drilling holes in the filter lid.
Phew and all that following the question what is AFR.