Databases use character strings stored in columns of fixed legth very often and almost all these columns contain trailing spaces because stored texts are not always of the maximum allowed length.
To make the comparison of such strings easier the shorter string is padded with spaces needed to make it equal to the length of the longer string.
This rule is independent on your opinion on MSSQL but some database engines (e.g. FoxPro) allow more flexibility in string comparisons and you may decide about the exact match or (as an opposite option) comparison in the length of the shorter string.