Many countries have a financial reward for medals. Russia gives you a new Mercedes, a six-figure USD sum and a lifetime pension for a gold (the Mercedes is for any medal, but the model gets worse.) (This was in 2014, I think they may have jiggered the reward since then). The US pays five-figures to any medal winner.
I'm not saying that it's a good business decision, but it's definitely some compensation depending on the country.
I also wonder how it works in smaller countries. If you are the gold medalist from your country do you get endorsements? Like, sure, the US team won X, but we have a lot of medals and how many people really care about that sport. As of today Iran has won one medal (a gold) and Kuwait has won one medal (a bronze). Are those people heroes back home?
*Edit: Thanks to the person who corrected my spelling