I'm not sure you can say everyone acts 'rationally'. I mean, your payday example might tug at the heartstrings, and certainly in an acute pinch one might need to resort to payday loans, but what about the time in-between? It would be more rational to work more hours, up skill, cut expenses, go to a bank to get a personal loan, or educate oneself. Sure, you can find reasons why a given person might have none of those options available, but that's not always going to be the case.
Likewise, why do people sit at a pokies machine throwing in hundreds of dollars? Obviously due to the dopamine rush. Is it rational though? You can get a dopamine rush doing all sorts of things. If you want, you can stock trade and get the same dopamine rush, except with a mildly positive EV instead of a strictly negative EV. Again, not really rational.
Finally, in a market system, if only some actors are rational and others are not rational, the market scheme will suffice to incentivise rational behaviour, and build a functioning system. That's what we have. No one is perfectly rational, but there are plenty of us who understand EVs, who know what variable ratio reinforcement is (and how to avoid bad examples of it), and who invest rationally. That is enough to build a functioning system.