Why the second term is transposed, but not the first one? I am not very good at maths. I just have this silly question. Why do I have to transpose the second term in expectation?
I mean why $Var(X) = E[(x−μ)(x−μ)^T)]$ and not this $E[(x−μ)^T(x−μ))]$ ?

When you multiply matrices, the adjacent dimensions need to match, so you can multiply the (n, k) matrix by (k, m) matrix, or (m, k) by (k, n), but not any other way around. Where you would see the transpose symbol it depends on if the data is stored row-wise or column-wise. If you take something like a dot product of row vectors, you would transpose the second element so you multiply (1, n) by (n, 1), but if the data had the initial shape of (n, 1), you would do the opposite.
