How was the Pythagorean Theorem discovered?
Exact sequence of events is unknown. But what is really important is the fact that Pythagoras and/or his students and followers came up with a proof of this theorem.
It is very important to be able to prove something that you were not told how.
It's like an ability to find your way in the labyrinth.
Did you try to prove this theorem yourself?
If not, try it. If you succeed, great. If not, take a look on the Web, there are many proofs of this theorem.
I also put four different proofs of this theorem on Unizor under menu items Geometry - Length, Area - Pythagorean Theorem.