Everyone is over-complicating this very simple concept. It only purges when you enter ThemeShop or eShop if you have purchased (or downloaded free) DLC or a Theme on your consoles NNID.
Scenario time:
1. New 3DS, New NNID, I want the Free Sonic Boom Theme and I also want the Lucas Smash Bros DLC. I open ThemeShop and eShop and purchase them which creates two tickets on my 3DS - a Theme DLC ticket and eShop DLC ticket.
2. Now I've hacked said 3DS and install a ThemePack and the Final Fantasy TheaterRythm DLC from that ISO site OR CIAngel OR any other source you get your content
3. All is well, I have all my DLC, but you know what I want to check eShop just to see what deals are out there cause I like supporting Nintendo anyway
4. Open eShop, browse but don't buy anything and close out to Home menu
5. What the heck! Now my Theme is the basic grey theme, what happened? Well, you have a valid ticket entry for only the Sonic Boom theme, not any of the other ones you illegally installed so they were removed during the eShop's check of your ticket (They have to know what you've bought to know if you can download again without purchasing it, right?)
6. Check your theme's and all you have is the crappy free Sonic Boom theme. So you re-install the themepack, spend an hour deleting 100 themes (I know new packs are out but this is an example from long ago) and your back at it.
7. Now you want to play FF TheaterRythm, but what the heck? Now your DLC is gone for that? Same as the Theme's ticket, it was erased when you entered eShop because you didn't have a valid entry for it.
8. So now you have to re-install all your illegal DLC, but your Lucas DLC is fine because you actually purchased it.
Does that make sense? Ok. Good. So now, next scenario:
1. New 3DS, New NNID, and I'm a pro cause I know how to hack already on 3DS, never enter eShop, never get that crappy free Sonic Boom Theme and go straight to installing CIA
2. Eh, what's in eSHop anyway? Anything good? Maybe I'll check it out and log in but not buy anything since arrrrgh I'm a pirate!
3. Exit eShop to home screen and all my CIA themes and DLC are in tact. Why? Because I never purchased ANYTHING from ThemeShop OR eShop to create a local ticket on my 3DS for DLC content.
Now, I don't know why it isn't this way for games, and I'm not a dev, but what I do know is that this is what we determined to be the case in many various threads from about a year or so ago.