theres a point in out cycle when we want peak cylinder pressure to happen to apply the most amount of force on our crank
but sadly petrol has a pressure to which it will "knock" at so sometimes if we are running a compression ratio too high fo our petrol we have to set or ignition advance not set at the optium to avoid detenation issues of our petrol (im not saying this is always the case aswell)
its a balancing act, between cylinder pressures/avioding knock and producing the most amount of force on our crank at the right crank angle