When you get all hot and flustered as the TEC and blow your starbase to hell and take out the enemy fleet, you don't get your next starbase with all of that dead starbase's goodies.
Not analogous in the slightest...XP is unique as there is no substitute...SB upgrades can be purchased, they can be chosen at will...even if you don't have the resources, an eco ally might and can give them to you...
But there is nothing you can do to get levels on a Titan other than kill enemy ships, which quite simply isn't always a choice...you may not be in a position to attack or may not even have any enemies around you...or your enemies may not be providing you opportunities to get XP...
Capital ships not retaining their levels is also not analogous, as no lvl 5-6 capital ship completely dominates the game and wipes the floor...
Competitive MP? bullshit smurf village steam-peening for stats is no reason to have in a feature. let the little buggers cry because they lost their titan. This isn't WOW. You die, you lose, go read a book.
It isn't just for MP...many SP people would be royally pissed if they lost a titan and had no recompense...that they aren't "tough enough" to suck it up is a BS insult...games are meant to be fun, not Nazi boot camp discipline on a CD...
This isn't the only thing in the game that works like this...even if you lost all your research labs, you don't automatically lose your technology, you retain it...forget realism, if you lost all your technology after losing some labs, you would be truly hosed...
Losing a titan is bad enough....they take a long time to rebuild (even longer if you don't have the foundry anymore) and are expensive...even if you got one instantly, it may take a long time to get it to the frontline....you already suffer heavily for losing any titan...
As a counter example, fleet supply doesn't drop as your ships get blown up. If you lose a huge battle, your economy is crippled and you can't rebuild your fleet as quickly and you might lose because of that.
Just like Titan level retention, this too is done for gameplay purposes...if people didn't have permanent maintenance costs, games would never end....the massive influx of resources you'd get after losing your fleet would allow you to quickly rebuild and players would rarely be able to capitalize on their victories and maintain momentum...
Titans are different because if one is lost, the player may not be able to replace it...they take a long time to build (while frigates can be built as they are lost) and an enemy can snipe out the titan foundry....if you nest your foundry deep in your empire, you won't get it to the frontline in time to prevent an enemy from capitalizing on their momentum...
I won't claim the system is perfect, but this is one occasion where I think the devs made a good call in regards to gameplay and balance...I might be pissed if I work my ass off to bring down a titan only to see it 10 minutes later...but I'd be more pissed if I lost my high level titan due to something like repulse or blocking issues and had absolutely no chance for redemption....