CKEDitor removes class names, even with the exception in config
Go to "Admin >> Configuration >> CKEditor"; under Profiles, choose your profile (e.g. Full).

Edit that profile, and on "Advanced Options >> Custom JavaScript configuration" add config.allowedContent = true;.



Don't forget to flush the cache under "Performance tab."