I got to this post and stopped reading, so if someone said this below, good on em!
The leaner an air fuel mixture, the hotter it burns. The hotter it gets the more the gas expands, the more the gas expands the higher the pressure. Pressure is a force over a certain area, the area is staying constant, hence force increases. Torque on the crank is equal to the force on the piston (with some funky angular changes) multiplied by the distance from where the conrod joins the crank, and the middle of the crank.
There is a point though where there isn't enough fuel being put in to burn properly, or burn enough to make enough alternate gases.
Remember, Pressure, volume and temperature are all related.
Hence, leaning it out, more pressure, more force, more torque. Power = Torque * RPM... Hence, more power.
As mentioned though, leaning out increases temperatures to a point that certain vital components are not adequately cooled, and hence, melt.