It's a strategy that's only really available to the ultra wealthy, because the banks are willing to give them a bespoke loan with a much lower interest rate that's payable after they die. There's also a complex trust setup to pass the asset to their heirs.
These laws are the way they are so that if a kid has their parents die they aren't facing an immediate giant tax bill on cap gains. It applies to basically anyone inheriting even a normal house. The difference in cost basis could be 90% of the value.