There is a purify and a Clean-up option on a WYSIWYG field.
Clean up HTML? – Whether Craft should run through some HTML cleanup routines when the field is saved, including removing all tags, empty tags, and most style attributes.
Purify HTML? – Whether the field should run submitted data through HTML Purifier before getting saved to the database, removing any potentially malicious code. Note that this is meant to be be used when accepting input in a Rich Text field from un-trusted sources.
Turning the purify off, let's you output HTML. That being said, I'm not sure of what you are trying to achieve but inserting raw HTML into a WYSYWIG field isn't really the way to go about things. Maybe if you share the bigger scope of the issue, we can look into a better approach of your problem.
source: https://craftcms.com/docs/rich-text-fields
Like you pointed out, the Purify HTML option removes the 'id' and 'name' attribute. I would like to customize the HTML Purifier to allow these attributes but according to the post http://craftcms.stackexchange.com/questions/16366/how-to-customize-html-purifier this is not possible.
– vinniecent Jan 23 '17 at 12:36