While much of the world spent the past two decades worrying about energy security, cutting fossil fuel dependence and building cleaner power systems, Mexico largely sat the energy transition out.