Engineers (not the kind that drive trains) were so concerned about the high heat production at power settings above 75% that they built a special device into the carburetor to aid in cylinder cooling. This device is known as the economizer (sometimes called the power enrichment feature). When the throttle is "fully" opened (starting at approximately 70% of its travel) the economizer valve is activated and an extra ration of fuel is fed to the engine (approximately 10% more) as shown in Figure 1. In other words, the mixture is purposely enriched near the full throttle setting. Dosing out extra fuel helps lower potentially higher cylinder temperatures at these power settings. (It's called an economizer since less of an extra ration of engine-cooling fuel enters the cylinders at low power conditions when it's not necessary.)
This is one reason you don't want to let the throttle creep backward during climb. In addition to a loss of power, you'll lose the additional cooling offered by the economizer. It's also a good reason not to lean the engine at power settings above 75% (such as during climbs at altitudes below 5,000 feet MSL where high engine power production is likely).
The economizer valve is, however, an important reason why it's necessary to lean the engine during takeoffs from high altitude airports or at high density altitudes. Under these conditions, it's necessary to lean in order to obtain reasonable engine performance.
During a high altitude takeoff, shoving the throttle full forward activates the economizer. An extra ration of engine cooling fuel enters the engine along with the thinner air associated with high altitude airports or high density altitude conditions. An unnecessarily rich mixture prevents reasonable power production and reduced airplane performance. Leaning before takeoff is the key.
At high altitude airports I usually pull onto the runway, run the engine up to full power with the brakes on, then lean for maximum RPM (fixed pitch propeller assumed). Then I'll enrich the mixture just a bit to ensure a little extra engine cooling to be on the safe side. After all, climb airspeeds and high angles of attack make engine cooling less efficient. If obstacles require a maximum climb rate on departure, I'll leave the mixture leaned for maximum RPM during takeoff (this is the setting for best power production). I will, however, carefully observe engine temperatures on climbout. If they're high, I'll increase the mixture as appropriate.
If it's busy at the airport, and sitting on the runway while adjusting the mixture isn't feasible, then I'll adjust the mixture during a full power, static runup in the runup area.
If the airplane has a constant speed propeller, you won't be able to lean using RPM. However, if an EGT gauge is available, you should lean using it as a reference. Remember, at these high altitudes where you're not developing more than 75% power, detonation is less likely. Therefore, leaning for best power should present no danger to a properly maintained airplane engine. (See The EGT Primer.)
Always check your POH for recommended procedures concerning the airplane you fly. For instance, some airplane manufacturers recommend that you lean for maximum RPM when departing airports having an elevation of 3,000 feet or more. Each airplane can be a little different. So review the POH if you have any question.
For more information on this subject, see "Form And Function: Mixture Master."