Why doesn't every integral from 0 to $2\pi$ equal zero?
Solution 1:
the $\sin$ function is not injective on $[0 ; 2\pi]$ so you may not be able to do such a substitution. Since you cannot readily give an inverse, you may have some difficulty expressing everything in terms of $u$.
In your case, the $\cos(x)$ term that appears from the change of variable cannot be expressed only in terms of $u = \sin(x)$, so the thing you are integrating "from $0$ to $0$" is not even a function of $u$ :
$\cos(x)$ is either $+\sqrt{1-u^2}$ or $-\sqrt{1-u^2}$ where the sign depends on $x$ (and not on $u$), and so $\sin(x)dx$ is not of the form $f(\sin(x))\cos(x)dx$ for any function $f$.
To resolve this you can split the integral in three parts (splitting the interval at $\pi/2$ and $3\pi/2$) and do $3$ separate substitutions and you will obtain something true but mostly useless.
Thanks to the user @m_t_ for pointing out that in case this doesn't happen, the substitution rule is applicable.
Solution 2:
let's do it carefully. $$ A = \int_0^{2\pi} f(x)\,dx $$ Use the substitution $u = \sin x$.
We need to compute $x$ in terms of $u$. Well, $x = \arcsin u$, but that only holds for $-\pi/2 \le x \le \pi/2$. Outside that interval, you will have other formulas for $x$ in terms of $u$.
What about computing $dx$? Either $dx = \frac{du}{\sqrt{1-u^2}}$ or $dx = \frac{-\, du}{\sqrt{1-u^2}}$, depending on whether we are in an interval where $\sin x$ is increasing or decreasing.
So your result is not as simple as you thought.