Why does Nano 33 BLE draw an extra 2mA when pinMode() is called?

You have the source of the Arduino core. I think the file with pinMode() function is in ‘wiring_digital.c’.