Why maximum power is produced when all air is burnt i.e. rich air-fuel mixture is required? However, maximum temperature in cylinder is obtained at an air-fuel ratio of about 1.05 to 1.1 i.e. lean mixture?
Combustion phasing is an important criteria that should be considered and controlled to get maximum power output. Though the temperatures are high if the peak pressures occurs before TDC leads to -Ve power output, as the peak temperature before TDC demands more power inputs for compression stroke as the compression stroke not yet completed.
The combustion at TDC or just after TDC leads to maximum power output. So though the temperatures are high point of occurrence of peak temperatures and pressures plays a major role.
In some cases ( especially in CI engines) rich mixtures leads to advanced combustion much before TDC yielding -ve work.
So we can not say that always rich mixture gives maximum temperatures yielding maximum power outputs....
In your questions about I.C. engines you have to differentiate between S.I. and C.I. engines because fuels and combustion processes are completely different and so a specific answer to your question is hard to give.