Carlos Sainz was a surprise polesitter at the Mexican Grand Prix.