Aliases are per shell process. You need to reload your .bashrc (or whatever file you define aliases in) in every shell. Shell scripts are instantly available in all shell instances. Also, shell scripts can be invoked by shell scripts, which aliases can't.
I agree, but for something as simple as that Iād prefer a script to use `ssh-keygen` instead of relying on the presence of a one-line script in the PATH.