For anyone who don't bother check the source, that man lost his cryptocurrency because he store it on Quadriga CX (centralized exchange with poor wallet management).
Sure, Bitcoin is code, but how would Bitcoin know that you're dead?
More importantly, how to do it without rely on 3rd party?