The problem is related to odd-ball values, as Cristian Ciupitu suggests, but empty strings aren't the problem (at least, not when the value as a whole is quoted). The issue is related to names that could be confused with operators to test (or '[
'; on some systems, there really is a program /bin/[
). The POSIX standard has almost made this redundant, but consider what happens if '$USER' is '-f', '$RUN_AS_USER' is empty and the x's and quotes are not used.
if [ -f != ]
then : someone has a file called '!='
else : they don't have a file called '!='
fi
By using the quotes and the leading x, this sort of misinterpretation is avoided.