Fame and riches are two different things. You can be famous but still not rich like the example you gave of Scottish bacteriologist Alexander Fleming, the inventor of Penicillin. Likewise there is humanitarian and philanthropist in my country (Pakistan) who ran worlds largest ambulance service (under the Umbrella of welfare organisation) but he don't have even have a simple car for his personal use nor he has any personal home. For some people, becoming rich is to achieve there goals which may not necessarily involve monetary gain.
I would say it depends on the category in which one is getting famous. You can't become rich or start making money by becoming rich in a category that doesn't create opportunities for you to make money. The person you mentioned, late Abdul Sattar Edhi, was a great man, but he was working as a philanthropist, and that category in general doesn't allow you to make a lot of money unless you are dishonest with your work and don't spend the charities you get on the needy because when you run an NGO, you basically rely on charities to get things done. He also used what he owned for the poor.
However, if the category is different, like if someone gets famous in the showbiz or the digital media like social networks, they basically get to make a lot of money because they will be in demand, whether they create their own channels and gain views and everything, or start giving their time to channels for interviews, they might even get offers from films and stuff, so such people can have higher chances of making a lot of money because they stay relevant and in the headlines or trends for a longer time if they can maintain that.