In fact, the % ends a line without generating a space; an end-of-line in LaTeX input is normally equivalent to a space. Thus, for example, it allows one to split a word over lines without inserting a break. For example
this is an extr% ordinarily long wordwould produce "this is an extraordinarily long word" with no breaks. However, a command cannot be split over lines this way.