Well, the evolutionary reason is the one you mentioned: the thermostability of Taq allowed its bacterium to colonize high-temperature environments. That, however, does not say anything about the molecular reasons for this difference.
I found this very good answer on Quora. The end of the post has several references for its claims.
Long story short, the stability of a proteins folded state depends on the difference of free energy $\Delta G$ between the folded and unfolded states. However, $\Delta G = \Delta H - T \Delta S$, which means the difference in free energy can either come from a bigger difference in enthalpy (for example, salt bridges, hydrogen bonds, hydrophobic interactions and such in the folded state) or a smaller difference in entropy (for example, a low number of "not-rigid" amino acids like glycin , or a high release of water from folding).
While enthalpy is often the reason for stability of folding, it seems like for Taq polymerase the difference actually lies in an unusually small difference in entropy between the two states.
Edit: here is one of the best references of the post. Open the link above to find more. https://www.ncbi.nlm.nih.gov/pubmed/24174290