First, just to kill that red herring: This is perfectly valid HTML. Also: it is not filtered by Drupal's "Correct faulty and chopped off HTML"-filter (I just tested it), and turning that filter off will have no effect on this.
However, theThe CKEDitor by default restricts the HTML you can use to what it considers safe by means of something called the advanced content filter (ACF). It is this feature of CKeditor that rejects your HTML-construct.
To change or otherwise prevent this behavior, you must describe the construct you want to allow by using the syntax described in the allowed content rules and assigned the JavaScript variable config.extraAllowedContent
.
PS: If you Google this, you'll often see the following JavaScript suggested to "fix" to CKEDitor removing "unsafe" HTML:
config.allowedContent = true;
What the above line does it to turn ACF of completely. It will allow any valid HTML to be inserted. It is OK to do this for testing and debugging, but it is not recommended that you do this on a production site.