Technically speaking, the explanation for the answer is not correct. The explanation given is that SQL server ignores trailing spaces when comparing strings.
But in this example, SQL server isn't comparing strings at all. It's comparing integer values (the length of each string.)
The correct explanation is that SQL server ignores trailing spaces when calculating the length of a string.