Im not God so i can't and don't judge.
All i can say is life is not always fair, sometimes we question to much, sometimes never enough.
Not sure it would of saved your friend, but anytime you can be there for someone it helps.