Why doesn't the Stone-Weierstrass theorem imply that every function has a power series expansion?
Short answer. The sequence of polynomials guaranteed by the Stone Weierstrass theorem may not be constructible by appending terms of higher and higher order. The early coefficients can vary as the sequence grows. So you don't have the sequence of partial sums of a power series.
$$\lim_{n\to\infty}\left(\lim_{k\to\infty} a_{n,k}\right)$$ is, in general, not the same as $$\lim_{k\to\infty}\left(\lim_{n\to\infty} a_{n,k}\right)$$ and in order to switch the order of your infinite sum (which is in its definition a limit) and your limit, you would need something like that.
I'm not sure what sense you can give to $$ \lim_{n\to\infty}a_{k,n} $$ There's nothing in the Stone-Weierstrass that can even hint to the existence of such limit.
The traditional example of a $C^\infty$ function that's not everywhere analytic well illustrates this. Try and find a polynomial approximation for $$ f(x)=\begin{cases} 0 & x=0 \\[4px] e^{-1/x^2} & x\ne0 \end{cases} $$ and you'll realize that the exchange is not possible, because the limit under scrutiny cannot exist.