One of the tasks of the ECU is to calculate the amount of fuel to inject. In simplified form the ECU uses two tables to do this. The first one is the main fuel table. It is programmed into the ECU and is not lost when the battery is disconnected. This table contains fine grained information of the throttle valve position vs. the engine rpm. Each cell in the table contains information on the amount of fuel to inject. This table should be calibrated to the current state of the engine. The main fuel table looks something like this:

When things change in the engine (for example due to age), or the environment changes (temperature, air pressure etc), the ECU needs to make changes to the amount of fuel that is injected. It determines the changed needed by looking at the lambda sensor. It tries to keep the signal from the lambda sensor as close to 14.7:1 (lambda 1) as possible. In volitile memory (which is erased when you disconnect the battery) it makes a small table with only a few cells in which it stores corrections. These corrections are added to the value in the main fuel table. This is the long term fuel trim table. This table looks something like this:

Now this works pretty well when the main table is calibrated for the engine. However, when people tune the engine, they are going to rely on the long term fuel trim table to keep the fueling correct for the new state of the engine. As you can see, this long term fuel trim table has very few cells compared to the main fuel table. So as the engine gets further and further away from the main fuel table, it will be harder for the ECU to keep the fueling correct.

Because the long term fuel trim table is so coarse, this can lead to non consistent behaviour of the engine. For example, you’ve been driving not very fast. Rarely coming above 4000rpm and not going above 70% throttle. So the ECU is updating the long term fuel trim table. It does this also for the very big cell in the upper right side of the table. But it only learns values for this cell from the tiny bit you are using it (3600-4000 rpm, and 35-70% throttle valve position. Lets assume it learns a correction for 10% more fuel in this cell. Now you come to a faster bit of road, go 80% throttle to 5000rpm. It might need a bigger correction there, but it hasn’t seen this part of the revrange yet, so it uses the 10% correction it already learned.

In the above there are some things left out, like open and closed loop operation and short term fuel trims. But the basic idea stands. Modifications to the engine will be compensated by the ECU, but up to a limit and not very optimal. But then, this feature was never designed for engine tuning.

The best thing to do is to actually recallibrate the main fuel table so it contains the correct values for the engine’s state of tune.