This is regarding Theorem 12 on Page 180 of Dummit and Foote's Abstract Algebra. The theorem asserts that if $G$ has subgroups $H$ and $K$ with $H$ normal and $H \cap K = 1$, then with $\phi: K \to \textrm{Aut}(H)$ be the homomorphism defined by mapping $k \in K$ to the automorphism of left conjugation by $k$ on $H$, we have $HK \cong H \rtimes K$. In particular, if $G = HK$ then $G$ is the semidirect product of $H$ and $K$.
Then on Page 181, at the beginning, the authors lists how to classify groups using semidirect product. In the example on Page 182 regarding groups of order 30, it is mentioned that $G = HK$ and $H \cap K = 1$ so $G \cong H \rtimes K$ FOR SOME $\phi : K \to \textrm{Aut}(H)$.
I am unable to understand the following. First in order to classify we need to make sure that $G$ arises as semidirect product, and then find all homomorphisms $\phi: K \to \textrm{Aut}(H)$. But how does one come to the conclusion that $G$ is a semidirect product, except with respect to some homomorphism $\phi: K \to Aut(H)$. These seems circular to me. How does one come to the conclusion that $G$ is a semidirect product? If it is by using Theorem 12, then that theorem is applicable with respect to conjugacy action. In short what does the statement "G is the semidirect product" mean without reference to a homomorphism? And why does semidirect product classifies groups of small order given in the book? There may perhaps be some group which need not arise as semidirect product with respect to any $\phi$.
Thank you.