I always thought that the point of "the way of the warrior is found in death" stuff was so that you accepted that you were dead, got past your fear of death and so could get on with life more effectively.
Originally, that's what was about. By Yamamoto's time, though, it had become a kind of death fetish, with men committing junshi
(suicide following the death of one's lord) for no good reason, to the point that junshi
was outlawed. This was the case of Yamamoto in specific, in that the Hagakure was written after he'd retired into the countryside after being denied the right to commit suicide.