Stomatal response to environmental conditions forms the backbone of all ecosystem and carbon cycle models, but is largely based on empirical relationships. Evolutionary theories of stomatal behaviour are critical for guarding against prediction errors of empirical models under future climates. Longstanding theory holds that stomata maximise fitness by acting to maintain constant marginal water use efficiency over a given time horizon, but a recent evolutionary theory proposes that stomata instead maximise carbon gain minus carbon costs/risk of hydraulic damage. Using data from 34 species that span global forest biomes, we find that the recent carbon-maximisation optimisation theory is widely supported, revealing that the evolution of stomatal regulation has not been primarily driven by attainment of constant marginal water use efficiency. Optimal control of stomata to manage hydraulic risk is likely to have significant consequences for ecosystem fluxes during drought, which is critical given projected intensification of the global hydrological cycle.