There is a criterion for equality in a more general setup. Given a short exact sequence of groups
$$ 1 \to N \to G \to Q \to 1 $$
where $\text{cd}(Q)<\infty$, the group $N$ is of type FP (meaning $\mathbb{Z}$ admits a finite length resolution by finitely generated $\mathbb{Z}N$-projective modules) and $H^n(N;\mathbb{Z}N)$ is free for $n=\text{cd}(N)$, then
$$ \text{cd}(G) = \text{cd}(N) + \text{cd}(Q) $$
This is Theorem 5.5 in the book "Homological Dimension of Discrete Groups" by R. Bieri.
I do not know any example of a group with $\text{cd}(G \times G) < 2\text{cd}(G)$, but there is an example in the book "The geometry and topology of Coxeter groups" by M. W. Davis of groups $G_1$ and $G_2$ with $\text{cd}(G_1 \times G_2) < \text{cd}(G_1) + \text{cd}(G_2)$. It is example 8.5.9 in page 157.
In fact, this example describes two Coxeter groups $W'$ and $W''$ such that
$$ \text{vcd}(W' \times W'') < \text{vcd}(W') + \text{vcd}(W'') $$
Since the virtual cohomological dimension is the cohomological dimension of any torsion-free subgroup of finite index, the corresponding subgroups $G_1$ of $W'$ and $G_2$ of $W''$ satisfy the strict inequality.
This example is attributed to the article "On the Virtual Cohomological Dimensions of Coxeter Groups" by A.N. Dranishnikov. In this article Corollary 1 says that for a Coxeter group $\Gamma$ we always have $\text{vcd}(\Gamma \times \Gamma) = 2\text{vcd}(\Gamma)$, so you have $\text{cd}(G \times G) = 2\text{cd}(G)$ for any torsion-free subgroup of finite index of a Coxeter group.