Same as any top athlete, endorsements are much more than prize money. I mean, how much must the typical Aussie swimmer have spent on coaching, it's not just for the gold medal at the Olympics every four years.
Plus people like the prestige of winning competitions. Just think of how much people spend on extra food, supplements and training before they enter (for example) a PA lifting competition, thousands of dollars and hundreds of hours a year for what, a trophy?
Heaps of people look at his pictures and talk about him. Many people enjoy that attention.