On the other hand, some astronauts could get significant money out of giving talks and writing books, etc. At least if they are the first to land on the Moon, or Mars, or similar.
However, I suppose most of those who enter training will never even enter space. It's a rock star earning model: very many try, very few succeed completely. But people do it also for other reasons than money.