Why is the Killing form of $\mathfrak{g}$ restricted to a subalgebra $\mathfrak{a} \subset \mathfrak{g}$ not the Killing form of $\mathfrak{a}$? I know that the Killing form of $\mathfrak{g}$ restricted to an ideal $I \subset \mathfrak{g}$ is just the Killing form of $I$.
However, what happens in general if we relax the conditions and just consider the Killing form restricted to a subalgebra $\mathfrak{a} \subset \mathfrak{g}$?
 A: As to the question "why":
The Killing form of $\mathfrak{a}$ is given by
$$k_1(x,y) := Tr (ad_{\color{red}{\mathfrak{a}}}(x) \circ ad_{\color{red}{\mathfrak{a}}}(y))$$
for $x,y \in \mathfrak{a}$, whereas the Killing form of $\mathfrak{g}$ restricted to $\mathfrak{a}$ is given by
$$k_2(x,y) := Tr (ad_{\color{red}{\mathfrak{g}}}(x) \circ ad_{\color{red}{\mathfrak{g}}}(y))$$
for $x,y \in \mathfrak{a}$. The second one involves "bigger matrices" a.k.a. more information, namely, how $x,y$ operate on the entire $\mathfrak{g}$, whereas for the first one, we forget everything about how they act outside of $\mathfrak{a}$. For examples how that can make a difference, see the other answer.
Now if $\mathfrak{a}$ happens to be an ideal, then the "bigger matrices" in the second case actually have a certain block form, so that the traces are completely determined by the blocks which correspond to $ad_{\color{red}{\mathfrak{a}}}$ of the respective elements, and that is why in that case, our two options are the same. It is worthwhile if you try to write down these "block forms" yourself to see what's happening. (It's done (Spoiler warning!) here.)
A: The question 'what happens' is  best answered by looking at an example, so the first question is: where do we find examples of subalgebras that are not ideals? 
Here is a class of examples. consider the real Lie algebra $\mathfrak{g} = \mathfrak{sl}_n$ of traceless $n$-by-$n$ matrices. It has a Cartan decomposition $\mathfrak{g} = \mathfrak{k} \oplus \mathfrak{p}$ where $\mathfrak{k}$ is the $(n(n-1)/2)$-dimensional subalgebra of anti-symmetric matrices and $\mathfrak{p}$ the $(n(n+1)/2 - 1)$-dimensional subspace (not algebra) of symmetric matrices. Inside $\mathfrak{p}$ there is a unique-up-to-conjugation maximal abelian subalgebra $\mathfrak{a}$ which we might as well (and, following convention, will) take to be the $n-1$-dimensional abelian subalgebra of diagonal matrices.
The nice thing about this set-up (well there actually many even nicer things about it, that is why these names are standard, but well) is that neither $\mathfrak{k}$ nor $\mathfrak{a}$ is an ideal in $\mathfrak{g}$.
Let's look at $\mathfrak{a}$ first. It is abelian so the killing form of $\mathfrak{a}$ itself is $0$. However, the restriction of the killing form of $\mathbb{g}$ to $\mathfrak{a}$ is not. We can decompose $\mathfrak{g}$ as the direct sum of $\mathfrak{a}$ and a bunch of root spaces for the adjoint action of $\mathfrak{a}$ (in other words: we can treat $\mathfrak{a}$ as a cartan subalgebra, this is because $\mathfrak{g}$ is split) and so we find that $ad(A)$ for some element $A \in \mathfrak{a}$ is diagonal with $n-1$ zeroes, $n(n-1)/2$ entries equal to $2$'s and $n(n-1)/2$ entries equal to $-2$.
It follows that $(A, A) = 4n(n-1)$ which is rather different from $0$. Here $(.,.)$ denotes the killig form of $\mathfrak{g}$. $(A_1, A_2)$ for different elements of $\mathfrak{a}$ yield multiples of 4 closer (in absolute value) to zero, but is zero only if $A_1 = -A_2$.
The case of the subalgebra $\mathfrak{k}$ is rather different, but I have to run now, maybe I come back to it later, or you can try it yourself. 
