Compute $$I:=\int_C\frac{z^9}{5}dz,$$ where $C$ is the curve $z(t)=\sin t+i\sin10t$, $0\leq t\leq\pi/2$.
Would the answer be: $I=\int^{z(\pi/2)}_{z(0)}\frac{z^9}{5}dz$ where $z(\pi/2)=1$ and $z(0)=0$, and thus $I=\frac{1}{50}$?
Or would it be: $$I=\int_{z(0)}^{z(\pi/2)}f(z(t))\cdot z'(t)dt=\int_0^{\pi/2}(\sin t+i\sin10t)^9\cdot\frac{1}{5}\cdot(\cos t+10i\cos10t)dt$$ $$=\frac{1}{50}?$$
They both evaluate to $\frac{1}{50}$, but is this just a coincidence?
Your first approach uses another curve \begin{align*} z(t)=t\qquad\qquad 0\leq t \leq \frac{\pi}{2} \end{align*}