Oscar Piastri claimed pole position for the Bahrain Grand Prix, as McLaren team mate Lando Norris could only manage sixth.