For bosonic strings, on the wordsheet there are bosonic fields $X^\mu(\tau,\sigma),\ \mu=0,1,...,D-1$. In the light-cone coordinate, we take,
$$X^+=\frac{1}{\sqrt{2}}(X^0+X^1),\\
X^-=\frac{1}{\sqrt{2}}(X^0-X^1).$$
Within the light-cone gauge, we can fix for the string that $X^+\sim\tau$. Therefore $X^+$ plays the role of time. The non-trivial point for strings is that $X^-$ can be solved in terms of $X^+$ and $X^I$ with $I=2,...,D-1$ and turns out to be $\sigma-$independent. That means that there are no dynamical degrees of freedom for the field $X^-$. Therefore, there are only transverse oscillations on the strings. For the mode-1 excitations of the string, we have $D-2$ independent creation operators corresponding to the transverse oscillations:
$$a^I|\text{ground state}\rangle,\ \text{for}\ I=2,...,D-1.$$
All these states carry the spacetime indices and there are $D-2$ states in total. Thus it must represent a massless gauge field. It turns out that, indeed, we can select the dimension of spacetime such that the above states are really massless.
My question is that, what is the insightful way to see that string theory was born with massless gauge states? I guess the fact that $X^-$ has no degrees of freedom comes from the reparametrization invariance. Can somebody provide an insightful explanation?
What if it turns out that, we can not set the mass for above states to be vanishing for any dimension $D$ of spacetime (this is possible, since the the dimension $D$ of spacetime must be integer which is a rather strong constraint). In string theory, we now know that, it is not the case. Is it simply a coincidence?