As authtentictech noted above, disabling the editor can work (I create a text format of Full HTML-No Editor) to deal with the edge cases where this can pop up. Here, it's only straight code that is put in--no WYSIWYG editor is allowed for that format).
It can get really annoying when having to collaborate with editors, though (if they don't know how to code). If at all possible, it may be better for you to create HTML classes, since CKeditor is actually trying to help you avoid adding bad code and non-conforming visual design to your layouts.
Sometimes, the solution can be simple, as well--for instance, I use a custom icon font, and span classes are used to display icons in text. Per the developer's instructions, adding it to HTML text would be <span class="[class name]"> </span>
. CKedtior interprets that space between the span tags as irrelevant, and strips it out. Adding
in place of the space fixes it, and no changes to settings are required.