What does this if-then statement mean?

You are right, the command

test "x/usr/share" = "x/usr/local/share" -o "x/usr/share" = "x/usr/share"

returns true (0) always.

It looks like if the file in question was generated from a more generic version but the way of generation was not optimal. The script should either ask for actual paths each time or keep just the relevant branch in the generated file.

However, this particular file comes from a package – not being generated on your machine. This is likely something to be fixed/improved… You can file a bug on Xfce Bugzilla (if it’s not present there already) or fix it yourself. You can clone the Git repository for Xfce4 session, you can also get in touch with Xfce4 developers using their mailing list. Good luck with improving the code!