Why is this equation for TAS only valid for subsonic flow?
Because you didn't read the text in the Wikipedia page above that equation ;-)
That equation works for subsonic flow only because you have replaced the Mach number of the original TAS formula:
$$ \text{TAS} = a_0 M \sqrt{\frac{T}{T_0}} $$
with the formula of Mach number for subsonic flow:
$$ M = \sqrt{\frac{2}{\gamma - 1} \left[ \left( \frac{q_c}{p} + 1 \right)^\frac{\gamma - 1}{\gamma} - 1 \right]} $$
which exploit the simple form of Bernoulli's formula, working only for incompressible flows, i.e., subsonic flows. Check the Mach number and the Bernoulli formula pages for further details.