This article introduces how to disable the removal of trailing whitespace and tabs at the end of lines in Atom. It’s an unclear feature.
You can turn off this trimming by going to Atom > Preferences, and then scrolling down until you see the Whitespace package. Click on the package and you will be able to either disable the package entirely, or use the provided config options to disable just the “Remove trailing whitespace” feature.
Do not automatically trim end of line white space · Issue #27 · atom/language-python