Command 'add-apt-repository' not working

I don’t know why, but after testing it apparently works either way. Very confusing. Didn’t know that, because I usually exclusively use Debian and its derivatives.