Is Mg(OH)2 more insoluble than MgCO3?
I finally found the answer.  

In temporary hardness, we have to remove $\ce{Mg^2+}$ ions by precipitating it. In $\ce{Mg(OH)2}$, $\ce{Mg^2+}$ ions in water are present in the concentration that is cube root of the solubility product, but in $\ce{Mg(CO3)}$ it is the square root of the solubility product. So, despite $\mathrm{K_{sp}}$ of $\ce{Mg(OH)2}$ being higher than $\ce{Mg(CO3)}$, $\ce{Mg^2+}$ ions in $\ce{Mg(OH)2}$ are comparatively less than $\ce{Mg^2+}$ ions in $\ce{Mg(CO3)}$.