About Primitive roots mod n in Diffie-Hellman
The problem you want to make hard in Diffie-Hellman type groups is taking discrete logarithms, whereas you want exponentiation to be easy. Now when you pick a subgroup $G$ of $\mathbb Z^*_n$, the cost of exponentiation will be roughly proportional to $n$ whereas the cost of taking discrete logs will be proportional to $\sqrt{k}$ where $k$ is the order of the largest subgroup in a decomposition of $G$. (Actually, for the number field sieve the formula is more complicated and less than $\sqrt{k}$, but it is still an expression in $k$.) So you want to have $k$ big to get your security up and once you've decided on $k$ you want $n$ to be as small as possible to make the whole thing efficient. In other words, you want to minimise the computation cost to security level ratio $n/k$.

The best possible choice is to let $n = p$ a large prime: if $n$ were not a prime and had nontrivial factors, then $k$ couldn't be larger than the largest of these factors, and all other factors are just slowing things down without adding any security. Since $\mathbb Z^*_p$ has $p-1$ elements which will be an even number, there's always a subgroup of order $2$ and the best possible choice of group order is $q = (p-1)/2$ again a prime (in which case $p$ is a "strong prime"). For such a choice, $k = q$ as it doesn't have any nontrivial factors, so the computation cost/security level ratio is $n/k = p/q$ is approximately $2$, the smallest possible. And in this case any generator is automatically a primitive root.