I was reading Finite Abelian Groups in Herstein.In one of the examples, it's written,
Let $G = \{e,a,b,ab\}$ be an abelian group of order 4 where $a^2=b^2=e,ab=ba.$ Then $G = A \times B,$ where $A = \langle a\rangle $ and $B = \langle b\rangle $ also $G= C \times B $ where $C=\langle ab\rangle $ and $B=\langle b\rangle .$
But $A = \langle a\rangle = \{a,e \}$ and $B = \langle b\rangle = \{b,e \}$ so $G =AB$ but it's written $G=A \times B.$
How come internal and external product be equal, they are isomorphic only know?
In general, the direct product and the external product are not isomorphic , with the most trivial example being that if you have a finite group $G$ then $G\cong GG\ncong G\times G$.
It just so happens here that indeed $\{e,a,b,ab\}=AB\cong A\times B=\{(e,e)(a,e)(b,e)(a,b)\}$. The "canonical" isomorphims mentiond in the comments is this:
$φ(xy)=(x,y)$ which you can easily check that inded is an isomorphism.
Some trivia, unrelated to the question: Since there are only two groups of order 4 , the cyclic one and the one you describe, it is a bit rudundant to say that our group is abelian.
Anyway, hope this helps.