$c^2=a^2-b^2$ is used when determining the foci of an ellipsis. However, it is unclear where this formula arises from. It is not at all intuitive for me. A previous answer I found on Stack Exchange was the following:
Using the diagram above, the formula can be derived by pythagoras. However, I am unsure why that length is $a$. I do not understand there explanation. $a$ is that distance on the $x$ axis, so why is the length shown on the diagram also $a$?
I am looking for a solution that clearly explains the derivation and intuition for this formula used to find foci.

One definition of an ellipse is the geometric shape formed by the set of all points $P$ in the plane so that the sum of distances to the foci, $PF_1+PF_2$ is constant.
Now, if we pick the point $P$ to be the point of the ellipse on the positive $x$ axis, this sum of distances is $(a-c)+(a+c)=2a$. On the other hand, if we pick $P$ to be the point on the positive $y$ axis, the sum of distances is clearly twice of the diagonal length indicated in your diagram in the question. By the property/definition of the ellipse above, this shows that your length is $a$.