You don't think children understand right from wrong? I knew at a very young age what obey mom and dad meant!
As has been stated, the ability to obey does not imply that a child understands the concepts of right and wrong which might underly the command.
To find more about how morality develops in a person, try searching on google for 'moral development', lots of research out there.