The controller had 2 modes - 2D mode and 3D mode. For 2D mode you held the left and right handles. For 3D mode you held the middle and right handles. In 3D mode the Z trigger replaced the L button. Games used less inputs then so you didn’t need access to the D-Pad.
A lot of people misjudge the N64 controller and these people mostly never used it and apply modern control standards when judging it. They presume that it was awkward to reach the D-Pad and L button when you were playing in 3D mode when I’m reality you never really had to do this due to the reasons I mentioned above.
Of course, the design wouldn’t work today because control schemes are more complex and you’re required to have access to as many inputs as possible, but back in the days it worked perfectly with games designed around the hardware which required less complex inputs.
3D mode