Let's try this on a different vector space. Here's a nice one: Let $\mathscr L = C([0,1])$ be the set of all real continuous functions defined on the interval $I = [0,1]$. If $f, g \in \mathscr L$ and $a,b \in \Bbb R$, then $h(x) := af(x) + bg(x)$ defines another continuous function on $I$, so $\scr L$ is indeed a vector space over $\Bbb R$.
Now I arbitrarly define $f \cdot g := \int_I f(x)g(x)dx$, and quickly note that this operation is commutative and $(af + bg)\cdot h = a(f\cdot h) + b(g \cdot h)$, and that $f \cdot f \ge 0$ and $f\cdot f = 0$ if and only if $f$ is the constant function $0$.
Thus we see that $f\cdot g$ acts as a dot product on $\scr L$, and so we can define $$\|f\| := \sqrt{f\cdot f}$$ and call $\|f - g\|$ the "distance from $f$ to $g$".
By the Cauchy-Schwarz inequality $$\left(\int fg\right)^2 \le \int f^2\int g^2$$ and therefore $$|f\cdot g| \le \|f\|\|g\|$$
Therefore, we can arbitrarily define for non-zero $f, g$ that $$\theta = \cos^{-1}\left(\frac{f\cdot g}{\|f\|\|g\|}\right)$$
and call $\theta$ the "angle between $f$ and $g$", and define that $f$ and $g$ are "perpendicular" when $\theta = \pi/2$. Equivalently, $f$ is perpendicular to $g$ exactly when $f \cdot g = 0$.
And now we see that a Pythagorean-like theorem holds for $\scr L$: $f$ and $g$ are perpendicular exactly when $\|f - g\|^2 = \|f\|^2 + \|g\|^2$
The point of this exercise? That the vector Pythagorean theorem is something different from the familiar Pythagorean theorem of geometry. The vector space $\scr L$ is not a plane, or space, or even $n$ dimensional space for any $n$. It is in fact an infinite dimensional vector space. I did not rely on geometric intuition to develop this. At no point did the geometric Pythagorean theorem come into play.
I did choose the definitions to follow a familiar pattern, but the point here is that I (or actually far more gifted mathematicians whose footsteps I'm aping) made those definitions by choice. They were not forced on me by the Pythagorean theorem, but rather were chosen by me exactly so that this vector Pythagorean theorem would be true.
By making these definitions, I can now start applying those old geometric intuitions to this weird set of functions that beforehand was something too esoteric to handle.
The vector Pythagorean theorem isn't a way to prove that old geometric result. It is a way to show that the old geometric result also has application in this entirely new and different arena of vector spaces.