"Why would I perform this coordinate change when I can diagonalize
instead?"
Sometimes we don't want to actually perform the coordinate change; we just want to know that such a change exists. As @WillJagy points out, Sylvester's law says that not only is there such a coordinate change, but the number of $+1$ entries (sometimes called the "signature") is the same for any such coordinate change.
Here's my favorite application:
Take a smooth compact surface without boundary $S$ in 3-space. Consider the function
$$
f_v: S \to \Bbb R : (x, y, z) \mapsto (x, y, z) \cdot v
$$
For almost every unit vector $v$, this will be a smooth function. To simplify, let's suppose that $v = (0,0,1)$ works, so that $f(x, y, z) = z$.
Now the second derivative of $f$ at each point $P = (x, y, z) \in S$ is a symmetric bilinear form on the tangent plane to $S$ at $P$. If we look at each critical point $Q$ of $f$ (for a sphere, that'd be "the south pole" and "the north pole"), this signature tells you whether the surface 'bends down' at $Q$ (as at the north pole) or "bends up" at $Q$ (as in the south pole, or "bends both ways" (as in the two middle critical points for a bagel that's balanced vertically on a table). It doesn't matter how much the surface bends up or down, hence I don't care about the eigenvalues; all that matters is that in every direction at the south pole, it's bending up. And the signature tells me that.
The cool theorem? The sum (over all critical points) of $(-1)^{\sigma(Q)}$, where $\sigma(Q)$ is the signature, is the same as the Euler characteristic of the surface.
This is all laid out in detail (along with the technical hypotheses required for it to work, like "critical points of $f$ must be isolated") in the first chapter of Milnor's Morse Theory.
The matrix $A$ should be real in order that a real $P$ exists.
Suppose the eigenvalues are $a+bi$ and $a-bi$, with $b\ne0$. The relation can also be written as
$$
AP=P\begin{bmatrix} a & b \\ -b & a \end{bmatrix}
$$
If $v$ is a complex eigenvector relative to $a+bi$, then, due to $A$ being real, $\bar{v}$ is an eigenvector relative to $a-bi$. These two vectors are linearly independent, being relative to distinct eigenvalues. Thus also
$$
x=\frac{1}{2}(v+\bar{v}),\qquad y=\frac{1}{2i}(v-\bar{v})
$$
are linearly independent. Note that $v=x+iy$ and
$$
Ax+iAy=Av=(a+ib)(x+iy)=(ax-by)+i(bx+ay)
$$
Equating the real and imaginary parts, we get
$$
Ax=ax-by,\qquad Ay=bx+ay
$$
Thus the matrix with respect to the basis $\{x,y\}$ is exactly $$\begin{bmatrix} a & b \\ -b & a \end{bmatrix}$$
Best Answer
Yes. The number of positive, negative and zero elements remains invariant when diagonalizing the matrix. This is called Sylverster's Law of Inertia
To get a more intuitive understanding, notice that $x^TAx = x^TP^{-1}DPx$. But by the Spectral Theorem, any symmetric matrix with real values can be diagonalized by an orthogonal matrix which means that we can rewrite our original equation as $x^TAx = x^TP^TDPx = (Px)^TDPx$. So in this case, $P$ defines just an orthogonal change of coordinates and has no impact on the "shape" of the quadric.
If P wasn't orthogonal then you would be stuck in the former expression $x^TP^{-1}DPx$ which doesn't imply a nonorthogonal change of coordinates.