I know that a congruence system certainly has a solution if $gcd(m_1, m_2) = 1$ $$ \begin{cases} a_1x \equiv b_1\pmod{m_1}\\ a_2x \equiv b_2\pmod{m_2}\\ \end{cases} $$ but there are some systems that are solvable even if this condition does not apply. For example: $$ \begin{cases} 4x \equiv 7\pmod {15}\\ 8x \equiv 11\pmod{21}\\ \end{cases} $$
while in others this does not happen: \begin{cases} x \equiv 1\pmod {10}\\ x \equiv 4\pmod{15}\\ \end{cases} My question is: how do I understand when a system admits a solution?
You are looking at the system $$\left\{ \begin{array}{c} a_{1}x=b_{1}\text{ mod }m_{1}\\ a_{2}x=b_{2}\text{ mod }m_{2} \end{array}\right.$$
First take the simpler system $ax=b\text{ mod }m$. This has a solution for $x$ iff $\left(a,m\right)\vert b$. Try to prove this with Bezout's theorem.
In particular, the original system may lack a solution, even when $\left(m_{1},m_{2}\right)=1$: $$\left\{ \begin{array}{c} 2x=3\text{ mod }6\\ 5x=7\text{ mod }35 \end{array}\right.$$ Each equation separately has no solution.
So $\left(m_1,m_2\right)=1$ is not sufficient, and as you pointed out it isn't necessary either.
The necessary and sufficient condition is that $\left(a_1,m_1\right)\vert b_1$, $\left(a_2,m_2\right)\vert b_2$, and $\left(a_{2}m_{1},a_{1}m_{2}\right)\vert a_{1}b_{2}-a_{2}b_{1}$. Necessity isn't too hard to show. Given the condition holds, Bezout's identity gives $u,v\in \bf{Z}$ such that $ua_{2}m_{1}+va_{1}m_{2}=a_{1}b_{2}-a_{2}b_{1}$. Then the solution is $$x=\frac{b_{1}+um_{1}}{a_{1}}$$
This is a solution as $a_{2}b_{1}+ua_{2}m_{1}=a_{1}b_{2}-va_{1}m_{2}$ which is a multiple of $a_1a_2$ say $a_1a_2x$, then $$a_{1}x=b_{1}+um_{1}$$ $$a_{2}x=b_{2}-vm_{2}$$