Though code is an asset as well... Just not as valuable as people might think. Code is not a liability if it is not used, the liabilities come from production usage.
I agree with what you mean, but I’d nitpick and say it’s not the code itself that’s the asset, but rather the behaviour of that code when executed. If you could refactor and get the same behaviour with less code (whatever that means), that’d be a net win, right? So the quantity of code is making a negative contribution.
Put another way, the feature is an asset, the code is a liability.
I consider code to be a liability, and Git history to be an asset. If something's in version control, there's no need to keep unused cruft around "just in case" it's useful in the future.
Code is only an asset to the extent it fulfills a need that can't be otherwise fulfilled.