I don’t share passwords with family, they all know good password hygiene though and use generated passwords for all their services. For end-of-life scenario apple does have digital legacy https://digital-legacy.apple.com/
Speaking as someone who has lost six family members and managed four of those estates since 2019, these digital legacy features are generally incomplete or developed with little view toward reality. Edit: they’re often also not setup by the user or if they are, they’re not reliably updated.
Apple’s implementation, for example, starts a timer that will eventually nuke the account, and it doesn’t provide access to end-to-end encrypted data. That data specifically includes iCloud Keychain, which many people use to store their credentials.
I understand the privacy reasons for that, but when we die we are leaving behind increasingly large or complicated estates of accounts, services, apps, and devices with various and sometimes unpredictable safeguards. Having a loved ones actual credentials has been invaluable every time I’ve managed an estate.
I absolutely understand what you’re saying and I don’t necessarily disagree with it. But break glass access to credentials has proven important in my experience. Especially where continuity of that access is relied upon by others.