and gas without the octane boosting ethanol doesn’t?
Detonation occurs when you have too much timing advance and or too high of a compression ratio for the octane rating. The higher the octane, the slower the burn rate.
Detonation is basically what a diesel engine does. The way it is able to survive is that the fuel is injected directly into the cylinder at a predetermined time so that it detonates a few degrees before top dead center on the compression stroke.
Gasoline engines mix the fuel in the carburetor or in the intake runnier if fuel injected and compress the mixture.
Alcohol is only one of the ways to raise octane. In the days of olde, we used lead.
Methanol, ethanol, LPG and CNG all have higher octane than gasoline. For diesel it is called cetane.