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−μ))]$ ?

If you use the convention that $(\boldsymbol{x} - \boldsymbol{\mu})$ is a column vector, i.e.  $(\boldsymbol{x} - \boldsymbol{\mu}) = \begin{bmatrix}
           x_{1} - \mu_1\\
           x_{2} - \mu_2\\
           \vdots \\
           x_{m}- \mu_m
         \end{bmatrix}$, then $(\boldsymbol{x} - \boldsymbol{\mu})^T$ is a row vector, i.e $(\boldsymbol{x} - \boldsymbol{\mu})^T= [x_{1} - \mu_1, x_{2} - \mu_2,\dots ,x_{m} - \mu_m]$.
The product of a column vector and a row vector forms a matrix with the corresponding pairwise products as entries. The product of a row vector and a column vector (the dot product) results in the sum of the pairwise products.
Since your $Var(X)$ is a variance-covariance matrix, you need to have the product of a column vector and a row vector, i.e. $(\boldsymbol{x}-\boldsymbol{\mu})(\boldsymbol{x}-\boldsymbol{\mu})^T$.
