If you grew up being taught to look out for others, you’re more likely to do it. But if you’ve always had to fight for survival, your instinct might lean toward “me first.”
You answered it right, we’re a bit of both. We’ve got the capacity to be good as well as bad, and the decision depends on our approach that develops based on our upbringing. We always teach our kids to be good, but at times they still lean towards “me first.”, which sometimes justify as well, because if you are not comfortable yourself, then you can't help others.
For example, I would help my friends going to any extent, not thinking about myself, but my kids will keep something for them at least, not to end up in streets :)
Lot's of times in order to help others you first must be safe yourself or believe that you are safe.