Aggressive spark advance gives you more power but also leads to pinging/knocking if advanced too much.
Pinging is pre-detonation, fuel is self igniting before spark plug fires, pinging causes pits in pistons and valves and will lead to parts failure.
Gasoline Octane numbers are self ignition/heat numbers, 87 octane will self ignite at a lower temp than 89 octane, which will self ignite at a lower temp than 91 octane, ect.....
So........if you chose to run a higher octane you can often use more spark advance.
A gallon of 87 octane and 93 octane gas have exactly the same "power"/energy, the difference is that when running higher octane you can advance spark more, without pinging.
EGR(exhaust gas recirculation) helps cool cylinders when under load, accelerating, yes, hot exhaust gas cools cylinders, lol, go figure.
Cooling the cylinders holds off the start of pinging, which can allow you to run 87 octane and a bit more spark advance than without EGR.