Octane as an additive slows down the propogation of the flame front, and resists auto-ignition.
A higher octane #, is usually necessary in longer stroke engines.
Not always, as other design factors can come into play.
Choose your octane grade fuel based on being the minimum grade prior to "pinging". As you see, weather ,altitude, load , and operating habits, enter into the picture also.
It is true that higher octane #'s not needed, is a waste of money! USUALLY !
That said, most oil companies also introduce quality additives at the mid-grade levels. i.e. cleansers, upper cyl lub, anti rust, etc, that you do not get at in the low[est] grade, as part of their additive package.
Mid-grades will usually get you that "package" minus some octane.
I've got a guzzi that has "expensive tastes", a Honda ST11 that just does not care, and a BMW 1150 that runs well on puke gas only most of the time except for mid-summer..
ride safe, have fun