In autumn, when you shake a branch, the leaves are detached. Why?

When the branch is shaken, it moves, but the leaves tend to stay in their original position due to inertia. This difference in motion causes the leaves to detach and fall.