What happens to Google and Apple accounts when the owner dies?

When we die, it's not just physical estates that need to be settled, an entire digital footprint survives us. So what do Apple and Google do with that data?

Sources