This seems to be an area of mystery for some people based on some maps I've looked at for bikes that have come in lately. It made me feel it would be a good topic to help people better understand what timing advance does and why its important.
Spark advance serves one purpose and that is to over come the ignition delay. When you fire a spark plug the flame needs time to propagate the flame through the combustion chamber, this is ignition delay. This time needed to do this is fixed, but we vary the timing of the event based on engine speed and fuel being used.
To better illustrate this lets look at the piston speed since it would be our independent variable since the fuel being used and time needed to propagate the flame front would be the same.
Lets look at the piston speed of and FZ07 and assume the idles at 1800 rpm. It has a stroke of 68.7mm, so at 1800rpm that give us a speed of ~13.5 FPS (Feet Per Second) the piston is traveling at. Then for the example you are only revving the engine to 10,000 rpm. The piston is now traveling at ~75 FPS and this relationship is directly proportional to .0075 FRP / RPM.
What does this mean for you and your motor? So logically we knew even before calculating the piston speed things happen significantly faster in the upper rpm's but our flame still needs a finite amount of time to propagate in the combustion chamber. So the only way to accomplish this is advance when the spark happens relative to base timing. The spark plug will need to fire sooner to allow more time for the mixture to ignite and create the power we are looking for when we build a motor.
How do we do this and what happens if you get it wrong? Most motorcycles run what would be considered "Open Loop" or "Non Feedback" ignition timing, meaning there is not a sensor such as a knock sensor to pull timing from the ignition map. This is also why its so important to have it correctly mapped to start and why if you map for fuel X and run fuel Y it might cost you an engine...The burn rate could be different and need less advance. If this is the case your engine is now fighting to get the piston to the top of the cylinder and that is one source of knock or detonation.
As far as tuning the ignition table for a motorcycle it is really pretty simple by measuring the torque with the feedback of a eddy current dyno. There are a lot of ways to do this but Minimum advance for Best Torque or MBT is the easiest way to measure this. Holding the bike in steady state while increasing advance till the torque stops rising is where you will find this value. You can then step up incrementally to map a few points a long the rpm range and this will generally show you a trend. You can then put in a small safety margin to keep knock away and you're all set. The Engine you spent so much money having built is happy and so is your wallet for a longer length of time before needed a refresh of the engine.
But isn't there a difference in tuning for horsepower vs torque? No. You can only measure Torque on a dyno, horsepower is calculated. You really only need the load cell feedback (Torque) measurement and a wideband O2 sensor to fully tune a bike. If you can tell me what torque you are making a given rpm I can tell you want the hp is, its the same was a dyno tells you. HP = Torque x RPM / 5252.