The main question is why the Pythagorean theorem for right triangles:
$$ a^2+b^2=c^2$$
is such a central tool of Euclidean geometry. There are many different approaches one can take to this; I'll give it a shot.
One of the key observations is that the triangle is the most basic 'non-trivial' shape in plane (two-dimensional) geometry. Any three points - one could exclude those that lie on a single straight line, but even that is not strictly necessary as one can even regard a line as a special case of a triangle - uniquely define a triangle, constructed simply by drawing straight lines between them. As such, it is quite a natural thing to study, and it is therefore perhaps not completely surprising that many scholars independently did so, and discovered things like the Pythagorean theorem.
Now, why does the Pythagorean theorem find such wide application? I think that the main reason is that many problems can be reduced to an application of the (simplest, two-dimensional) case of the Pythagorean theorem. Once one has discovered it, it makes sense to try and solve as many problems as possible by using it. This caused the ancients to investigate and discover many connections to more complicated shapes.
As a first example, we note that any regular polygon in two dimensions can be viewed as a collection of identical triangles arranged in a certain fashion. Another important observation is that the triangle is intimately related to the circle. For instance, if one considers a Pythagorean triple (i.e. three integers which satisfy $a^2+b^2=c^2$) one can divide by $c^2$ to obtain
$$\frac{a^2}{c^2}+\frac{b^2}{c^2}=1 $$
which is quickly seen to correspond to a rational point on the unit circle. In fact, this immediately shows that there are infinitely many Pythagorean triples (which are not multiples of any other Pythagorean triple), since the rational points on the circle are dense. This neat little observation (which I got from the first pages of Hatcher's freely available book 'Topology of numbers') shows that the triangle and circle are closely related, a fact which is often expressed using sine and cosine functions.
This, combined with the fact that circles are also known to be the set describing all points equidistant to a single point (the center) hints at another very important thing: One can define a notion of distance by using the Pythagorean theorem. In fact, after making the crucial observation that we can easily generalize to $n$ dimensions by 'decomposing' $\mathbb{R}^n$, $n$-dimensional Euclidean space, into $n$ copies of $\mathbb{R}$ (treating the coordinates independently, so to say), it becomes clear that we can use the Pythagorean theorem to define a notion of distance in any Euclidean space $\mathbb R^n$. This is known as the 'Euclidean distance' and is one the most important (early) examples of a metric; the study of metric spaces and related concepts has turned into an entire field of mathematics.
In conclusion, I have tried to illustrate some of the ways that one can naturally relate triangles to more complicated shapes and concepts. I personally think that, in a sense, this process of reducing as much as possible to a simple and well-understood problem is one of the most things in mathematics in general. Therefore, after finding a beautiful yet 'simple' fact like the Pythagorean theorem, it is only natural that the ancient scholars used it again and again in trying to extend their understanding of Euclidean geometry.
One final side-note: In view of my answer, it is natural to ask "But why is Euclidean geometry so important in our world?" The answer to this can be understood in the context of general relativity. In curved space, Euclidean geometry (and therefore the Pythagorean theorem) no longer holds true. However, since spacetime is (understood to be) a manifold, it can be locally approximated extremely well by flat space. In this context, that means Minkowski space, not Euclidean space. However, as long as one moves at velocities much lower than the speed of light, space and time can be separated to yield a simple picture of our spatial universe as a 3-dimensional Euclidean space, where we can use Euclidean geometry.