This ''innate goodness,'' that is, doing what is best for the community or the pack, comes from millions of years of evolution. Humans are capable of quite a bit, even in harsh times. Remember the men stuck in Russia after a shipwreck? They did not turn on each other. Only after some died, they ate off the bodies. But...you are talking about extreme circumstances. They would all have died eventually anyway, if there had been no rescue. If circumctances are that bad, the group is lost anyway. So, in history people with a tendency to undermine the pack mostly died, while the followers lived and became more numerous. That's how we ended up with today's society.
People die of starvation every day. If there is not enough food, is it better to share it evenly so everybody will die slowly? Practice shows that is not how it goes. If there are not enough resources, some will die for whatever reason. If we were somehow taught to keep sharing the food to the bitter end, then maybe mankind would have become extinct. In harsh times, some are going to have to die and a small group is going to survive. That doesn't make it evil.
Last example... Did we A) kill the mammoths until they were all gone or B) did we fight each other and became extinct? Answer A! is correct! And I might add, it is not something we would be proud of today.... Because to be ''moral'' is to hurt as many other species a possible while you keep as many humans as possible alive...