You’ve got it right in the first sentence, not sure about the rest of it.
The over-riding factor in any factory engine tune is emissions, it’s easy to refine a tune to give more power and better economy (especially in a diesel) but one or other of the controlled emissions (NOx, CO2, HC, particulates, etc) will then go off the chart.
So if you are an after market chip tuner that doesn’t have to submit to emissions test regimes then it’s easy to do, and this is the bit that really annoys me. Spend millions on development and testing to make it cleaner, and then someone can come along and re-tune and all that goes out the window, or exhaust in this case.
Ask any tuner or chip supplier which EU emissions their new tune meets and you get silence..
A close second consideration is then warranty / product life, most factory engines are de-tuned to not push the limits of component life… in theory, not always in real life.