There a variety of public benefits, namely nursing home Medicaid and VA Pension, that can cover the cost of long term care.  These programs have asset and income tests that  must be met before benefits can be received, and therefore a transfer of assets is often required.  Transferring of assets for long term care  benefit qualification is very complex, as thhe wrong transfer can prevent a person from receiving Medicaid benefits.  Along with planning for benefits, care must be taken when transferring assets as to not over pay taxes.
When an asset is sold for more than that which was paid for the asset, there is usually a capital gain tax due.  For example, if some buys  a piece of land for $5,000 and later sells the land for $12,000, there will be capital gains tax on the difference of $7,000. There is an important exception to this tax.  When someone dies,, their basis, what they paid for the asset, is said to be equal to the fair market value of the asset on the date of death.  In the example, the land would take a cost basis of the $12,000 on death, and if it was sold immediately after it was inherited, the difference between cost and sales price would be zero, so no tax would be due.
If someone  gives away assets directly to family and friends for purposes of qualifying for public benefits, this tax savings is lost. But, if the assets are  transferred to a properly drafted trust, the capital gains tax is prevented.  A properly drafted trust can protect the assets from counting for public benefits purposes, but still preserve the increase in cost basis for capital gains, and thus avoiding large capital gains tax.  As many individuals qualifying for public benefits have property which has significantly appreciated, preserving the increase in cost basis can save tens of thousands of dollars in tax.