Elaboration:
The quote, often attributed to John Nash in the movie, is a variation of the Nash equilibrium concept in game theory. The core idea is that the best outcome for everyone in a group (or a "game") is achieved when each individual not only acts in their own best interest but also considers the best outcome for the entire group.
So, anyone who tries to maximize one's self interest without contributing to the group's collective interest is going to lose in the long run effectively ! It's quite mathematical !