Why do children sometimes not do what they are told, even though their environment supports them fully to do so?
Children go through many phases of independence to detach from their parents.  The most (in)famous is the "no" stage (around 2 years old).  But they also get to a point where they actively do things that get a reaction.  There are two major incentives: one, it gets them attention on demand, and two, it establishes some power for them in the relationship.  Many parents reply with bribes, which validates the power struggle.

This is a good thing; by the time they are teenagers, a lot of what they do will be with their peer group and if they've gotten some practice, they'll be able to establish more favorable positions in power relationships with their peers.  If they're punished for questioning authority, they might form the habit of following authority without question, and once an authority has been established in their peer group, they won't question or challenge their decisions for the group.