Standard Deviation in Transformation vs annualizing monthly returns?

I'm very confused about this difference, and I wanted to know the reason behind it (If this is very rudimentary, I'm sorry but I can't seem to wrap my head around it).

If you were to transform a data set by multiplying it, the standard deviation would grow that same amount. For example, multiplying a data set by 3 would have the average multiplied by 3 as well as the standard deviation.

However, I learned that when you annualize monthly stock returns, you multiply the average monthly stock return by 12 to get the yearly stock return, and to get from the volatility (standard deviation) of the monthly stock return to a yearly stock return volatility you would have to multiply by the square root of 12. I'm not sure where you get the difference from. Aren't you just applying a transformation? I've checked every resource on annualizing stock returns and it gives me the same formula. But looking up linear transformation the standard deviation goes up by the multiplicative amount. If anyone could explain this to me, that would be great!

The key insight is that a yearly return equals the sum of the corresponding twelve monthly returns by definition.

Assuming that stock returns are independent and identically distributed (i.i.d.), we can apply the formula

$\text{Var}(X_1+\dots+X_n)=\text{Var}(X_1)+\dots+\text{Var}(X_n)=n \cdot \text{Var}(X_1)$

(The first equality is due to independence, the second is due to identical distributions.)
To obtain the corresponding standard deviation, you simply take a square root, which gives

$\text{st.dev}(X_1+\dots+X_n)=\sqrt n \cdot \text{st.dev}(X_1)$

This would not hold if stock returns were autocorrelated, for example. Since the dependence between consecutive stock returns is very hard to find and in any case its magnitude seems negligible, it makes a good approximation to assume they are simply independent.

By the way, turning from monthly returns to yearly returns is not a transformation in the sense you were referring to; the yearly return is not just January's (or any other month's) return multiplied by twelve. If it were, then you would indeed have $n$ in place of $\sqrt n$. Here is some intuition: the factor $\sqrt n$ is obtained when the returns are independent and the increases and decreases in stock prices compensate each other to some degree over time. Meanwhile, the factor $n$ is obtained when all returns are equal so that their variability is adding up without any compensation.