People with parrots usually will them to other people or a bird rescue. If not, animal rescue is called when the owner's body is found (we live where there are many retirees), the bird is quarantined for health reasons and then can be rehomed. ^_^
If you have a species that lives super long I'm sure this happens a lot.