It would be nicer to write
pin = digitalio.DigitalOut(pin=board.GP123)
# or this
pin = digitalio.DigitalInOut(pin=board.GP123, direction=digitalio.Direction.OUTPUT)
# than this
pin = digitalio.DigitalInOut(pin=board.GP123)
pin.switch_to_output()
"Explicit is better than implicit." Defaulting to input seems arbitrary and it would be better for code to be explicit about direction. And it makes it a one-liner to define an output pin, which is nice if you're doing many of these.
Note analogio differentiates AnalogIn and AnalogOut which is also very readable.