You can't take it with you, so the government might as well have it. Except, you can pass it to your family, or others of your choice.
The reason governments tax people upon death, is
Basically, there's less attachment to this money than other money, and hence less opposition. Its a soft touch.
Some taxes seem more pernicious than others. An example, in my view is Inheritance Tax – or Death Tax, as it should be known. Not only does it visit injustice upon the heads of the bereaved, it causes sub-optimal decisions to be taken by the individual while still alive, in order to minimise the bill.
One of the best examples of inheritance tax being unjust is the example of the farmer who has had a family farm for generations. The farm generates just enough to live on. The farm is in his name. When the farmer dies, the children take over the farm, but have to sell it to pay the tax bill. This adds insult to injury as well as unjustly removing the children from property that should be rightfully theirs. It is obvious to everyone that the children have more right to the proceeds of the father than the government.
When you are on your deathbed, what you need to be thinking about is how your family are going to survive, when they have to sell the farm/house or business to pay the inheritance tax.
Knowing that the Government are going to get your hard earned savings, is a demotivating and may reduce the output of the person who is later to die.