The only thing higher octane fuel does is burn in a more controllable manner. This helps reduce the risk of detonation (or knocking). Many factors contribute to detonation including IAT, air/fuel ratio, timing, etc.
With a performance tune the air/fuel ratio, timing and other parameters are set more aggressively than your stock tune. A side effect of this is increased risk of detonation. The way to counteract this detonation risk is to run higher octane fuel.
In other words, the extra hp from a performance tune comes from the tune. The higher octane fuel is simply to keep your motor in one piece.
Check out this article for a more in-depth explanation of detonation and octane: Detonation Explained