When people get married, they realize that they do things differently. For example, my husband likes doors to rooms to be shut (it looks orderly), I like them to be open (it looks, well, open). I won that difference of opinion; we keep the doors open.
My daughter apparently takes after my husband in this respect, she pushes closed all the doors in the house. But, whenever she closes a door, that implies that she has now shut herself into a room, and is not able to open it up to get herself out. (It is a skill she wants, but is both not tall enough or dexterous enough to accomplish - yet.) So far being stuck in the room has not concerned her, but that could be because I only give her a few moments before I open the door, and surprise! it's mama!
In fact, we played that game for a long time today. She would close the door to my room with her in and me out. After a few moments I would knock then come in. She would squeal with laughter, then walk to the door so she could close me out again, and again, and again.