Some commands in a command block will not run if the last character is a space.
Mod note
The actual problem might rather be that the syntax help is ignoring trailling spaces (see MC-165061). Removing trailing spaces when running a command might not be the wanted behavior, see also MC-65034.
Example in a command block: "setblock ~ ~1 ~ stone "