Why? When you specify
the number 2 and 1 are the file descriptors of standard error and standard output respectively. A file descriptor is an identifier which is assigned by the shell to keep track of open files (you may consider standard input, output and error as files for these purposes). When the shell reads your command line it executes things in the order you have placed them. So, first
Code:
2>&1 # standard error is redirected to standard output
# and since standard output is still redirected to
# the terminal the standard error is redirected to
# the terminal too (unesuful, because it was already)
second
Code:
> some_file # equal to 1> some_file
# redirects standard output to a file, but you're
# not telling anything about standard error, that
# is kept redirected to the terminal
In other words, the shell does not put redirection together simply because they appear on the same command line. Instead, redirections are executed in sequence: it is your care to specify them in the correct order. I hope it's a little more clear, now.