Advancing the timing can lead to more horsepower so long as you run higher octane gas. Detonation is a real modular engine wrecker (read: hypereutectic pistons hate detonation.)
The theory is, the ignition is already advanced somewhat (spark fires before the piston reaches top dead center.) When you advance it even more, the spark plug will fire even further before the piston reaches the top of the compression stroke, resulting in more of the air/fuel being burned.. this also leads to detonation (the air/fuel will ignite itself spontaneously and cause the piston to go slamming down when it wasn't quite ready to do that,) which is why you need higher octane fuel, it will resist spontaneous combustion more than lower octane.