I'm probably too late to get modded up, but since none of the existing responses gave the exactly correct explanation, I'll have to post rather than moderated.
sqrt(1) is 1. It's not -1. By definition.
A list of transformations of an equality like the one given in the grandparent's "proof" is shorthand for a list of "implies" statements. For example, a proof like this:
is actually shorthand for:
A. 2x-4=0 (assumption).
B. 2x-4=0 implies 2x=4 (by rules of arithmetic).
C. 2x=4 implies x=2 (by rules of arithmetic).
D. 2x-4=0 implies x=2 (from B and C, as implication is transitive).
E. x=2 (from A and D, by Modus Ponens).
When you rewrite the shorthand proof in the grandparent post in full form, the mistake becomes (more) obvious: a^2=b^2 does not imply that a=b. But this has nothing to do with the sqrt function, it is because of the square function; because it is not an injective (one-to-one) function.
To illustrate by taking it to an extreme - instead of f(x)=x^2, let's take a different non-injective function: f(x)=0. Would you have any trouble realizing that f(a)=f(b) does not imply a=b?
As an amusing curiosity, one way to define |x| (the absolute value of x) is sqrt(x^2). |x|, as you may guess, is also a non-injective function.