You’re not missing anything, that’s expected.
The Custom Code Embed component is a div in itself, and what you type in will be inside of that div. Always. That’s how Webflow works and you’ll have to deal with this, and find a solution while dealing with this.
To solve my problem, what should I do to apply a class (Special div 1, Special div 2, etc.) to a div block depending on the “My special div” CMS collection field?