Let me rephrase those precise equations in the language of finite-dimensional linear algebra. You have a vector $A$ and two bases $\beta=\{e_i\}_i$ and $\beta'=\{e_i'\}_i$. This means you can write the components of $A$ with respect to $\beta$ as
$$
A_i=e_i·A=\sum_j\delta_{ij}e_j·A
$$
and the components with respect to $\beta'$ as
$$
A_i'=e_i'·A=\sum_j(e_i'·e_j)e_j·A.
$$
Here the $\delta_{ij}=e_i·e_j$ is the direct equivalent of the $\delta(x-y)=⟨x|y⟩$, and the $e_i'·e_j$ is the direct equivalent of $e^{-ipx/\hbar}/\sqrt{2\pi\hbar}=⟨x|p⟩$.
Simply put, the presence of $\Psi(y,t)$ on the right-hand side of both expressions is simply because you're doing the inner products themselves in the position representation. You could equally write
$$\Psi(x,t) = \langle x | \mathcal{S(t)} \rangle = \int^{\infty}_{-\infty} \frac{e^{\frac{+iqx}{\hbar}}}{\sqrt{2 \pi \hbar}} \Phi(q,t)dq$$
and
$$\Phi(p,t) = \langle p | \mathcal{S(t)} \rangle= \int^{\infty}_{-\infty}\delta(p-q)\Phi(q,t)dq,$$
or any combination of the two representations for the inner products.
Remember that a basis of a vector space only needs to (1) span the vector space, and (2) be linearly independent. In particular, a basis does not have to be orthogonal, and it certainly doesn't have to be normalized. And one of the most common types of basis (a coordinate basis) is usually not normalized.
You're confused because you usually see the metric tensor in spherical coordinates given as
\begin{equation}
\mathbf{g} =
\begin{pmatrix}
1 & 0 & 0 \\
0 & r^2 & 0 \\
0 & 0 & r^2 \sin^2\theta
\end{pmatrix}.
\end{equation}
This is the metric with respect to the coordinate basis, whereas you've (correctly) written the metric with respect to the orthonormalized vector basis — and it's very important to remember the distinction between those types of bases. I'll explain.
Let's write the coordinate basis vectors as
\begin{equation}
\mathbf{r}, \boldsymbol{\theta}, \boldsymbol{\phi}.
\end{equation}
(Note that I'm using a bold font to indicate that these are vectors, but I'm not putting hats on them, for reasons that will become clear soon.) These vectors represent the amount you would move through the space if you changed the corresponding coordinate by a certain amount. For example, if $\mathbf{p}(r, \theta, \phi)$ is the position vector to the point with spherical coordinates $r, \theta, \phi$, then those coordinate basis vectors are defined as
\begin{align}
\mathbf{r} &= \frac{\partial \mathbf{p}} {\partial r} \\
\boldsymbol{\theta} &= \frac{\partial \mathbf{p}} {\partial \theta} \\
\boldsymbol{\phi} &= \frac{\partial \mathbf{p}} {\partial \phi}.
\end{align}
To relate that back to your basis given in Cartesian components, remember that
\begin{equation}
\mathbf{p} = r\sin\theta\cos\phi\, \hat{\mathbf{x}} + r\sin\theta\sin\phi\, \hat{\mathbf{y}} + r\cos\theta\, \hat{\mathbf{z}},
\end{equation}
which we can differentiate to find
\begin{align}
\mathbf{r} &= \sin\theta\cos\phi\, \hat{\mathbf{x}} + \sin\theta\sin\phi\, \hat{\mathbf{y}} + \cos\theta\, \hat{\mathbf{z}} \\
\boldsymbol{\theta} &= r\cos\theta\cos\phi\, \hat{\mathbf{x}} + r\cos\theta\sin\phi\, \hat{\mathbf{y}} - r\sin\theta\, \hat{\mathbf{z}} \\
\boldsymbol{\phi} &= -r\sin\theta\sin\phi\, \hat{\mathbf{x}} + r\sin\theta\cos\phi\, \hat{\mathbf{y}}.
\end{align}
Using these expressions, it's a simple exercise to see that we have
\begin{align}
\mathbf{r} \cdot \mathbf{r} &= 1 \\
\boldsymbol{\theta} \cdot \boldsymbol{\theta} &= r^2 \\
\boldsymbol{\phi} \cdot \boldsymbol{\phi} &= r^2 \sin^2 \theta.
\end{align}
So this basis is not orthonormal — and that's where the "usual" metric components come from, which is why the metric isn't just the identity as you expected. In fact, usually the only type of coordinates that lead to orthonormal basis vectors is a Cartesian coordinate systems (though even Cartesian coordinates are not orthonormal in nontrivial geometries).
On the other hand, a nearly identical simple exercise shows that your basis $(\mathbf{e}_r, \mathbf{e}_\theta, \mathbf{e}_\phi)$ is orthonormal. In fact, comparing our expressions in the Cartesian basis, we see that
\begin{align}
\mathbf{r} &= \mathbf{e}_r \\
\boldsymbol{\theta} &= r\, \mathbf{e}_\theta \\
\boldsymbol{\phi} &= r\sin\theta\, \mathbf{e}_\phi.
\end{align}
In an orthonormal basis, the metric is — essentially by definition — just the identity matrix, which is what you found.
Best Answer
Imagine a charge $q$ coupled with a classical electrical field, the transition between states $|i \rangle $ and $| f \rangle $ in the dipole approximation is proportional to
$$ p_{if} \sim \langle i | q{\bf r} | f\rangle = q\langle i | {\bf r} | f\rangle $$
If you think of both $|f\rangle$ and $| i \rangle$ as bound states of, say, the Hydrogen atom, you can obtain the selection rules that govern the transition between energy levels when the atom is coupled with light.
I am not going to give you the whole math, but that results in the famous $\Delta l = \pm 1$ and $\Delta m = 0, \pm 1$