Trailing whitespaces are simply useless and should not stay in code. In JavaScript, they can even be source of nasty bugs with multi-line strings.
If you encounter violations from this rule, this probably means that you are not using an automated code formatter - which you should if you have the opportunity to do so.
// The following string will error if there is a whitespace after '\' var str = "Hello \ World";