After a creature leaves the battlefield, it does briefly enter whatever zone it was put into before it ceases to exist. For example, a creature that’s put into a graveyard and then ceases to exist still triggers “Whenever a creature dies” abilities.