Question: "Why does we need this statement to ensure that the dimension of the tangent space do not depend on the embedding?"
Answer: If $X:=V(I) \subseteq \mathbb{A}^n_k$ where $I \subseteq k[x_1,..,x_n]$ is your variety and if $X :=V(J) \subseteq \mathbb{A}^m_k$ with $J\subseteq k[y_1,..,y_m]$ it follows you have two embeddings
$$i: X \rightarrow \mathbb{A}^n_k\text{ and }j: X \rightarrow \mathbb{A}^m_k$$
You get two definitions of the tangent space $T_x(X)$ at $x$: One using $I$ and one using $J$. Denote these two spaces by $T^I_x(X)$ and $T^J_x(X)$.
Example: Let $f(x,y):=x^2+y^2-1$ and let $I:=(f) \subseteq k[x,y]$. Let $p:=(1/\sqrt{2},1/\sqrt{2})\in S:=V(I)$ and make the change of coordinates
$$x:=u+1/\sqrt{2}, v:=y+1/\sqrt{2}$$
to get
$$f(u,v)=\sqrt{2}(u+v)+u^2+v^2$$
with $f^*:=\sqrt{2}(u+v)$. Let $I^*:=(f^*)=(u+v)\subseteq k[u,v]$. Define $C_p(S):=Spec(k[u,v]/I^*)$. With this construction you have made a coordinate
change and in the new coordinates $u,v$ it follows the original point $p$ corresponds to the origin $(0,0)$ and $C_p(S)$ is the "tangent line" of $S$ at $p$ viewed as an algebraic variety/scheme. There is an isomorphism
$$C_p(S) \cong Spec(k[t])\cong \mathbb{A}^1_k$$
since $k[u,v]/(u+v) \cong k[t]$ is an isomorphism of rings: map $t$ to the class of $u$ or $v$.
You may check that there is an isomorphism $\mathfrak{m}/\mathfrak{m}^2 \cong k\{t\}$ when $\mathfrak{m}:=(x-\frac{1}{\sqrt{2}}, y-\frac{1}{\sqrt{2}})$. Hence $Sym_k^*((\mathfrak{m}/\mathfrak{m}^2)^*) \cong k[x]$ with $x:=t^*$ the dual basis. Hence
$$Spec(Sym_k^*(\mathfrak{m}/\mathfrak{m}^2)^*)) \cong \mathbb{A}^1_k \cong C_p(S).$$
Note: You have defined the tangent space $T^I_x(X)$ as an algebraic "variety".
Given any vector space $V$ of dimension $n$ over $k$, we define the "affine space of $V$" (scheme theoretically) as
$$\mathbb{A}^n(V):=Spec(Sym_k^*(V^*)).$$
If $V:=k\{e_1,..,e_n\}$ is a basis for $V$ and $x_i$ the dual basis it follows
$Sym_k^*(V^*) \cong k[x_1,..,x_n]$ hence $Spec(Sym_k^*(V^*)) \cong \mathbb{A}^n_k$ is affine $n$-space over $k$.
When your lecturer says
"The tangent space is isomorphic to be the dual space of Ia/I2a, where Ia is the unique maximal ideal in OX,a (the stalk of the regular function at a)."
he means there is an isomorphism
$$T_a^I(X) \cong Spec(Sym_k^*(I_a/I_a^2)).$$
There cannot be an "isomorphism" $T_a^I(X) \cong (I_a/I_a^2)^*$ since $T_a(X)$ is an"algebraic variety" and $(I_a/I_a^2)^*$ is a $k$-vector space.
Since the local ring $\mathcal{O}_{X,x}$ is independent of embedding you get using this construction isomorphisms (let $I_a:=\mathfrak{m}_x$)
$$T^I_x(X) \cong Spec(Sym_k^*((\mathfrak{m}_x/\mathfrak{m}_x^2)^*)) \cong \mathbb{A}^d_k \cong T^J_x(X)$$
since $\mathfrak{m}_x/\mathfrak{m}_x^2$ has dimension $d$ over $k$.
It follows the two "tangent spaces" are isomorphic.
Question: "Why isn't the invariance of the dimension obvious?"
Answer: The definition of $T^I_x(X)$ involves the ideal $I$. It is not immediate that there is an isomorphism $T^I_x(X) \cong T^J_x(X)$.
Again: Mumford's book "The red book of varieties and schemes" devotes much space to explaining definitions in algebraic geometry. There is an intuitive explanation of the definition of the tangent space and tangent cone.