It is unrealistic to expect a child between 0-2.5 to obey you. They obey their own inner drive. A child at that age who bit another child is sorry that the other child is hurting, but they are not sorry they bit, because they had a NEED to bite in that moment.
A child between 2.5-4.5 know the rules, but sometimes they just have to disobey the rules. They don’t know why, they just can’t help themselves. If you have a child at that age, choose your battles. Don’t punish them over every single thing. Most of the time, their own guilt is punishment enough.
Great story from my friend Penny Conlon: A little boy spat in his mother’s face when she bent down to kiss him. She asked him why he did it, but he wouldn’t say, so she sent him to his room to have a think. When she went to him after 5 minutes, he was wringing his hands and said “I don’t know WHY I did it Mummy, I was going to kiss you, but my brain said SPIT at the very last second.”