Perhaps an iPhone never ‘runs on the charger’.
The power management system is centered on the battery. The battery is the most trustworthy power source. It cannot be suddenly unplugged or decide (without warning) to reduce power delivery because another device was plugged into the next USB port on the charger.
Power from the USB charger would be used opportunistically to charge the battery and then supplement the current demand of the iPhone electronics. But that demand jumps up and down rapidly as screen comes on and cell radio powers up, plus the CPU and GPU demands, amplifier for the speaker, GPS, chip, etc.
When the battery becomes ‘chemically aged’ (Apple’s terminology) then the iPhone no longer trusts the battery to not voltage collapse without warning when power demand spikes higher, even when a charger is connected. So the revised software now avoids stressing the battery any more than it calculates the battery alone can withstand.