In the US, where the majority of wealth is self made and not inherited, I’d guess that it is a function of IQ. Smarter people just make better decisions with their money on average.
Edit: for those that doubt [0]
[0] https://www.sciencedirect.com/science/article/abs/pii/S01602...