Using the mean for missing values is not ALWAYS a bad thing. In econometrics, this is a recommended course of action in some cases provided you understand what the consequences may be and in what cases it is helpful. As you have read, replacing missing values with the mean can reduce the variance but there are other side effects as well. Here isConsider for example what that can causehappens to a regression model when replacing missing values with the mean.
Note that for regression models the coefficient of determination $$R^2 = \frac{SSR}{SSTO} = \frac{\sum (\hat{y_i} - \bar{y})^2}{\sum (y_i - \bar{y})^2}.$$ Assuming you have missing $y$ values and you replace those with the sample mean then you can have anhave a $R^2$ value that is not as accuraterealistic as that from the real datait should be. More variance in the data means there is more data that is likely further away from the regression line. Since the $R^2$ value depends on individual observedobserved $y$ values (see $y_i$ in $SSTO$), your $R^2$ could be inflated because $SSTO$ will be smaller.
Let's look at an example.
Say you have a value $x_3$ and the corresponding observation for that $x$ value was $y_3$. We do the calculation for that result for SSTO and we have
$$ (y_3 - \bar{y})^2 $$
and that result gets added to the sum for $SSTO$. Now, instead, let's say that value $y_3$ is missing. We then let the missing $y_3 = \bar{y}$. We then have
$$ (\bar{y} - \bar{y})^2 = 0. $$.
As you can see, when we add this to the other results for the denominator the $SSTO$ sum will be smaller.