As books online indicates LEN() “Returns the number of characters of the specified string expression, excluding trailing blanks. “. DATALENGTH(), however, will keep the trailing spaces and take them into account when returning the number of bytes in the expression. One thing to note here is that if you are dealing with CHAR instead of VARCHAR data, your DATALENGTH() will be fixed for both values to the same length (20 in this example, 40 if NCHAR).

The majority of cases dealing with strings may not have to deal with trailing white space. But, if you happen upon a scenario where you need to check for equality inclusive of white space, this is an important distinction to have knowledge of.