Apple ID shouldn't be required for that (unless you're downloading it from the Apple Developer site instead of installing through macOS directly?).

Maybe I'm wrong? It's been a couple of years. I think I recall there were alternatives, but using my Apple ID was easiest?

You should just be prompted to install it whenever you try and run a command (like Git or Clang) that's installed by it. `xcode-select --install` triggers the installation as well. macOS just downloads and installs it through the same underlying mechanism that macOS updates are installed by, no account required.

(Homebrew also just installs it automatically now, without needing any user intervention.)

EDIT: Maybe you were put off by the insane time estimate that it presents for some reason? It quotes a multi-day installation time that ends up only taking a few minutes. Maybe Apple will fix that someday.