Ran into an interesting problem where I wanted my custom master page to NOT show my theme. I only wanted the theme to show on the _layouts pages and anywhere else not styled by my custom master page. You would think this would be as easy as simple removing this line from the master page:
The problem I ran into was even with this line removed, SharePoint would still show my theme on the custom master page after I applied it. Turns out SharePoint adds this line to your code: