There’s a separate command called visudo
for this purpose.
You CAN use any ol’ text editor but visudo has built-in validation specific to the sudoers file. This is helpful because sudoers syntax is unique and arcane, and errors are potentially quite harmful.
It’s insane that this is even legal.