sqrt() requires significantly more processing power to achieve than just squaring a value. Remember that squaring is nothing more than multiplying a number by itself, whereas sqrt() is a difficult proposition. What's the square root of 2? Your algorithm has to be prepared to come up with an answer for that, and the answer happens to be an irrational number so it's not even possible to represent that as a finite sequence of bits. While I don't know how sqrt() is actually implemented (it's probably different with each implementation of the C standard library), I do know it's far more complex than simply multiplying two numbers. :)
EDIT: Remember that there IS a limitation to your algorithm! Your algorithm to determine if a triangle is a right triangle (that's why you're comparing a^2 + b^2 == c^2, right?) is limited in size for a and b, because the resultant value from their squaring and subsequent addition could very easily overflow the value of the temporary values the processor would actually compare. For example, if you had int a = 33,000 and int b = 33,000, when each of them are squared they will equal 1,089,000,000. Then, when they're added together, (1,089,000,000 x 2 = 2,178,000,000) it will overflow the maximum size of an integer (which happens to be 2,147,483,647), and then even if the triangle were a right triangle it'd still return false. I'd cast one of those integers into a long, which will then do it right.
Wow I changed my sig!