Social Question

What makes someone decide whether to act in self-interest or group-interest?
I was in a class simulation recently, and I won’t go into too much detail, but basically we all chose a number of “fish” to take out of a limited pool, up to 10 fish, and after each round the remaining fish would get a 50% increase.
Well, a lot of people took it really seriously in many different ways. Some figured out quickly that if everyone didn’t take anything for two of the rounds, we’d as a group get to take the max for the rest of the simulation because the math would make our “fish” self-sustaining.
And for me, that made so much sense: there were a lot of rounds, and it wasn’t life or death, it was just a classroom excercise. But apparently it didn’t for a lot of people. So many people kept taking 10 fish while others (me!) “starved” with the 0.
I so don’t understand it. Yes, it’s just a classroom excercise, but it happens for real, too. Can someone help me and explain? My background is so community-oriented, and I know that, so I just don’t get the other side.
What’s your take on the concept in general?
What would you do? Do you do? Do you want to do?

