Scientists have actually being researching to find out the truth to why this happens. SCIENCE HAS THE ANSWER! What they have discovered is it's all about the way we move and different forces interacting with each other.
If you think about the way you undo your shoelace, you pull the end of the lace and the shoe laces immediately loosens and undoes. This as we're walking without the aid of our hands because of the interaction of forces caused by the impact of your foot on the ground and the swinging motion while you are walking. The stamp of the foot loosens the lace and the motion of your leg swinging pulls the end of the lace much like when you do to untie the show yourself!