In the book of Analysis on Manifols by Munkres, at page 199, it is given that
I do not understand why the author uses $g^{-1} (V)$ as the domain of $g_2 \circ g_1$. I mean, aren't we only know that $g(U) \subseteq V$. If so, why is the author not just define $g_2 \circ g_1$ on $U$.
I mean it looks like a minor detail, but it is as if I'm missing something.

It may be that $g_1(U)\not\subseteq V$. In that case, there are $p\in U$ such that $g_1(p)\notin V$, which means that $p$ can't be in the domain of $g_2\circ g_1$. Thus in order to guarantee that $g_2\circ g_1$ is well-defined, we must restrict the domain to $g_1^{-1}(V)$.