The semidirect product as a deformation of the direct product The way I think of the semidirect product is as a "deformation" of the direct product. Is there a way of making this intuition precise? Perhaps using some certain (co-) homology theory of groups?
 A: This was supposed to be a comment but it got too long.
It is misleading to think of the semidirect product with $\varphi = \text{id}$ as the categorical product. As I explain in this answer, the semidirect product is a (higher) colimit rather than a limit, and in particular its (higher) universal property involves maps out of it rather than maps into it. One way to state this universal property when $\varphi = \text{id}$ is that $G \times H$ is the commutative coproduct of the groups $G$ and $H$: that is, it is the universal group equipped with maps from $G$ to $H$ whose images commute. 
This is more visible once we generalize the semidirect product to other contexts. For example, if $G$ is a group acting on a $k$-algebra $R$, then there is a notion of crossed product algebra 
$$R \rtimes_{\varphi} G \cong R \langle G \rangle / (grg^{-1} = \varphi(g) r)$$
which is a version of the semidirect product. Here by $R \langle G \rangle$ I mean a "noncommutative group algebra" constructed by starting from $R$ and adjoining noncommuting formal variables, one for each element of $G$, subject to the relations in $G$. When $\varphi = \text{id}$ this reproduces the tensor product $R \otimes_k k[G]$, which again is the commutative coproduct of algebras (and in particular is neither the product nor the coproduct).

Having said that let me try to answer the original question. From the deformation perspective, there's no reason to restrict our attention to semidirect products: more generally we can consider arbitrary short exact sequences
$$1 \to N \to X \to G \to 1$$
as deformations of the trivial short exact sequence
$$1 \to N \to N \times H \to H \to 1$$
and ask if we can come up with a cohomology theory that describes this. The answer is yes. The thing we want to compute, which classifies the possible choices of $X$, is the nonabelian cohomology
$$H^1(G, \underline{\text{Aut}}(N)) \cong [BG, B \underline{\text{Aut}}(N)]$$
of $G$ with coefficients in the automorphism 2-group of $N$ (here $B$ denotes taking the classifying space). This is a gadget which tracks not only the automorphisms of $N$ but also the auto-natural transformations among those automorphisms, thinking of $N$ as a one-object category and automorphisms of $N$ as functors from that category to itself. It can be thought of as a topological group with $\pi_0$ isomorphic to $\text{Out}(N)$ and $\pi_1$ isomorphic to $Z(N)$.
The standard story in group cohomology makes extra simplifying assumptions to avoid the terror of having to talk about 2-groups. The easiest extra assumption is to assume that $N$ is central (and in particular abelian). This turns out to free us from having to think about $\text{Out}(N)$, and now the resulting central extensions are classified by the ordinary group cohomology
$$[BG, B^2 N] \cong H^2(G, N).$$
This whole story is better thought of as an aspect of homotopy theory. Short exact sequences of groups correspond to fiber sequences
$$BN \to BX \to BG$$
of homotopy types, and in general the classification of fiber sequences with fiber (homotopy equivalent to) $F$ (here $BN$) and base $B$ (here $BG$) is given by the nonabelian cohomology
$$[B, B \text{Aut}(F)]$$
of $B$ with coefficients in the topological group of self-homotopy equivalences of $F$. See also principal bundle. 
A: Let $H,K$ be subgroup of $G$ such that $G=HK$ and $H\cap K=e$.
case 1: $H,K$ are normal in $G$.
In that case as we can easily show that $hk=kh$ for $h,k\in H,K$. That is why giving meaning $hk$ to $(h,k)$ is very natural.
case 2: Now it is time ask what if only $H$ is normal? Now  we can not say $hk=kh$ but we can say that $H^k=H$ or we have an homomorphism $\phi: K\to Aut(H)$ and surprisingly $\phi$ completletly determines the result of "$hk$" and vice versa and $K$ is also normal if and only if $\phi$ is trivial homomorphism.
case 3: Now we removed all normality case which is known as Zappa–Szép product which define general method to define "$hk$".
