Why do children sometimes not do what they are told, even though their environment supports them fully to do so? I see many children that do (at times) not listen to their parents, or even do the complete opposite of what other people want them to do. That while the social environment supports them (with positive feedback on positive behaviour and possibly negative feedback on negative behaviour) to do what they are told.

Do we know the main drivers for why kids (at times) do not do what they are told to?

Is it their drive for freedom and autonomy? Attention? Something else?
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.