That’s a very good point… it goes both ways, of course – the Gym Leaders would have to pay out if they lose – but the Cerulean Gym example does support that. We see Ash lose Gym battles, and he never pays up, but Ash’s financial situation is vague at the best of times anyway. I guess it depends on how tough you think Gym Leaders are supposed to be: we know from context that they’re meant to be tough but beatable, but do we imagine that they lose about a third of their matches? Or more like one tenth? They would have to win many more matches than they lost in order to pay even for simple things like maintenance (and Blaine manages to keep his Gym – which undoubtedly has ridiculous maintenance costs – despite spurning weak challengers). We also have to question the amount paid by a defeated trainer – in the games, this varies according to the level of your strongest Pokémon and the number of Badges you have. Does this seem realistic, or would there be a standard wager that amateur trainers can easily afford?
Honestly the whole economic situation of the trainer lifestyle is totally opaque to me. Paying out to a trainer who beats you is only going to move money around between them, presumably they have to buy food, and it seems clear that you don’t have to be rich to be a full-time trainer, so obviously they must be making money somewhere, but they don’t really produce anything, so who’s paying them?
