My understanding is that it's not subject to the same tax it would have been as income, since the federal estate tax only applies to value above ~14 million per individual. So, my understanding is that a married couple can pass 25 million in stocks to their heirs and pay nearly no taxes on it because it's under the estate tax threshold and the capital gains cost basis got reset on their death. But not everyone can do this because you need enough assets or other business the bank wants to handle for them to be happy lending you money for years, and only people with a lot of assets have either of those things.
(I'm happy to be wrong about this, since it seems unfair, but AFAIK this is how it works?)