Transporting the deceased is not the job of an ambulance. In fact in most states it is against the law. If they pass on the way it is legal. Transport of the body is up to the medical examiner if there are criminal concerns. Or the local mortuary if it is natural causes.
Often they don't if the person is already dead and there is no hope of resuscitating them and they died of natural causes. This keeps the ambulance from being tied up in case another emergency comes up. Usually the coroner or a funeral home is called to take the body away.
The ambulance might have not come because no one contacted them or they had coordinated with a funeral home. When someone dies, a funeral home is always the first to be contacted by the family members or the first person who knew the incident. If it takes long for them to reach there, then the cops may take the body to a public funeral home until the owners come for it.