> 0 redirects to a file named 0. Note > something or similar syntax does not have to be at the end. The file will be created even if the former part ofcommand being redirected doesn't make sense. In your case the redirectioncommand is (i.e.[ 1 ] and it's syntactically valid: it checks if 1 in your case) doesn't make senseis a non-empty string.
You probably meant [ 1 -gt 0 ]. See help [ and help test | less.