My father, who flew combat missions for the Navy in Vietnam and then became a test pilot, told me after the loss of Columbia that if he had had a chance to make that flight and spend 7 days in Earth orbit, even knowing that he'd burn up on reentry, he'd have done it.
1) Eventually you will die, no matter what. It can be the most mundane thing. Slipping on a ketchup splatter can cause great damage for example.
2) It's a profession where you intentionally kill people, so, that changes the calculation for your own risk.
3) It's a unique opportunity.
(and potentially)
4) Gives a sense of living / be in history books for his family.
So you have a possibility of a guaranteed exciting life for a death that you anyway will have, but doing something you love, it's not too bad.