Once your child reaches around four years of age, you might detect a rebellious streak that causes you to worry. Namely, the kid keeps lying about things.
This is actually a vital part of their education, as they are learning “theory of mind”.
This is the understanding that other humans don’t share the same feelings, thoughts or opinions as you. For example, if you are talking to a three year old, they may expect you to understand why exactly they are crying, without feeling the need to explain it.
From the Hanen Centre:
Imagine you are handed a box of your favourite candy. When you open the box, you see that it is filled with pencils instead of candy. If your friend suddenly came into the room and saw the closed box with pictures of candy on it, what would he or she think was inside?
If you answered “candy”, then you understand “false beliefs”, which means you know that someone can believe something that is not true because they don’t share the same knowledge that you do.
*When 3 year olds are asked this question, they answer “pencils”, because they have not reached this stage of understanding in their theory of mind development
By the time they have developed theory of mind, they will test the bounds of this new information – basically by lying to you.
This link explains further, as does the below (cute as hell) video.