Here is one formulation of this argument; it is the same as the one suggested by user8268 in the above comments, but perhaps this formulation will make it clearer why this is a proof by dimensional analysis:
You want to prove that the sum of the squares on each of the non-hypotenuse sides equals
the square on the hypotenuse.
You generalize, and instead prove that for any shape, if you scale it by $a$, and then by $b$, the sum of the resulting areas is the area of the shape scaled by $c$. (We began with the case of the unit square.)
By thinking about how areas scale,
it suffices to check for one particular shape.
We check it by taking the shape to be the original triangle (to be pedantic: scaled so that its hypotenuse has length one). This case is clear: just drop a perpendicular from the vertex opposite the
hypotenuse to the hypotenuse, and see note that the triangle with hypotenuse length $c$
is the sum of two similar triangle of hypotenuse lengths $a$ and $b$.
The dimensional analysis is in the third step. The point is in the final
equality that is proved, i.e. in the final proof of $a^2 + b^2 = c^2$,
these quantities are not the area of any particular shape, but rather
are the scaling factors for the areas of the original triangle after scaling
its lengths by $a$, $b$, and $c$. This is why it is a proof by dimensional analysis.
[I originally posted this here, and you can see the comments there for some historical background on this particular argument.]