When system() gets a scalar, it goes to the shell to execute the command. This means that you open a new shell instance (such a ksh), and run the program, including any redirection.

If system() gets an array, it instead does the fork() and then uses exec() to start the process. This by-passes the shell, so shell redirection does not work.
i had a memory leak once, and it ruined my favorite shirt.