william--

As I re-read your posts in this thread, I came to the conclusion that you are actually wanting to know why we (and other creatures) behave as we do.

The bottom line, but nonetheless supremely unhelpful, answer is: because of something we are born with (nature),
or because of something about the way we were raised (nurture).

Scientists have been studying the nature vs. nurture aspect for ages (that is how they do in fact know what goes on in the minds of birds). They have made a great deal of progress in some ways (I'm thinking of the recently-developed ability of the FBI to do quite accurate profiles of criminals they have not caught), and very little in others (studies of identical twins raised apart and unaware of each other have shown remarkable similarities in the two, but nothing conclusive has been learned).

It seems to be human nature to want to know the "why" of everything. I know I do! But each person's history is
unique: even identical siblings raised together are not raised identically, nor are their perceptions of how they were raised identical. Each will perceive, correctly or incorrectly, that they or the other was more favored or less favored. This will have effects on their behavior, in either subtle or obvious ways.

This provides a nice lead-in to your question of how children who have no one who cares enough to teach them right from wrong come to behave. We all do whatever we think will result in getting our needs met. Infants cry when they are uncomfortable, and hopefully that will bring a caregiver who will provide relief. We continue that pattern all our lives, in some way or another. Kids who are raised without enough attention being paid to them, by and large are going to find ways to secure that attention.
As they become teenagers and are more able to get around on their own (though some don't wait that long), these attention-seeking behaviors tend to escalate into very destructive acts, both to themselves and others. That always hurt me so much to watch that, because I knew they were acting out in pain from the circumstances they were in,
and I knew that 99 out of 100 of them were only going to be in more painful circumstances as a result. Many times, I just felt like shaking the kid's parents and yelling, "Just love him/her, that's all they're asking!".
And then I would realize all too often that the parents were maybe in just as much pain, and for whatever reasons truly didn't have anything left to give the child.

The kids who somehow (here I am thinking of nature, as in born with a strong personality) become successful adults
despite horrendous childhoods are the lucky ones. I define successful here not as accumulation of wealth, but as simply being able to survive without being destructive to a debilitating degree. Children born with naturally self-effacing personalities, or who have had standing up for themselves literally whipped out of them, are the unlucky ones, unless they are fortunate enough to find someone who genuinely cares for them.