Ok, if you understand that the $du$ and $dv$ are linear functionals, then you must realise that the symbolisms $du^2$, $dudv$ and $dv^2$ are abbreviations for three bilinear maps $T_pS\times T_pS\to\Bbb R$ which are defined as soon as one understand that there is a basis for $T_pS$.
And in fact, they should be written as $du\otimes du$, $du\otimes dv$ and
$dv\otimes dv$.
But the basis for $T_pS$ is $\frac{\partial}{\partial u}$ and $\frac{\partial}{\partial v}$ where let us briefly rename as
$\partial_u=\frac{\partial}{\partial u}$ and
$\partial_v=\frac{\partial}{\partial v}$.
So,
because $du(\partial_u)=1$, $du(\partial_v)=0$, $dv(\partial_v=0$ and
$dv(\partial_v)=1$.
Then
$$du^2(\partial_u,\partial_u)=du(\partial_u)du(\partial_u)=1$$
$$du^2(\partial_u,\partial_v)=du(\partial_u)du(\partial_v)=0$$
$$du^2(\partial_v,\partial_u)=du(\partial_v)du(\partial_u)=0$$
$$du^2(\partial_v,\partial_v)=du(\partial_v)du(\partial_v)=0$$
Similar for $dudv$ and $dv^2$.
Now, if you are compelled to have a inner product in $T_pS$ then, the natural way to pair a couple of tangent vectors $X,Y$, one must consider them as a linear combinations
$$X=X^u\partial_u+X^v\partial_v,$$
$$Y=Y^u\partial_u+Y^v\partial_v,$$
and one can define first the metric coefficients
$E=\langle \partial_u,\partial_u\rangle$,
$F=\langle \partial_u,\partial_v\rangle$ and
$G=\langle \partial_v,\partial_v\rangle$.
Hence
\begin{eqnarray*}
\langle X,Y\rangle&=&(Edu^2+2Fdudv+Gdv^2)(X,Y)\\
&=&Edu^2(X,Y)+2Fdudv(X,Y)+Gdv^2(X,Y)\\
&=&EX^uY^u+2FX^uY^v+GX^vY^v\\
\end{eqnarray*}
gives us a scalar product in $T_pS$.