I do hope this was not a case of abuse. Also, anyone who cannot care for their pet due to a housing situation should find a no kill shelter, if possible, to leave their pet.
Having said that, I have worked for a veterinarian. I also know firsthand how difficult it can be financially to care for an aging or sick pet. If your pet dies at home, or is dying, and you cannot afford the $60-$300 fee that vets charge to euthanize, I can see how one would try to find a way to dispose themselves.
Before you scream at this post, let me tell you what many, many, many vets do with your pet after you leave the office. If you choose not to cremate, your pet often goes into the freezer after euthanasia. When the day comes for waste removal (a.k.a. trash day) the bodies are put in the dumpster. Yes, you pay your vet to put your pet in the trash.
It is a double standard. So please, if the ground is too hard to bury your pet or you live in the city without a yard, weigh your options for cremation (not with the vet - call yourself). Find a pet cemetery (burial plots for pets). Find a friend with a yard. Never leave a pet in the open in a dumpster. At least leave it at a shelter on the doorstep. They have to take care of the animal.
It is sad when pet care is such a business that the pet disposal, a heart-wrenching time for the owner, is so political and a money issue.