Because in the reasoning symbol A is used to denote "expected value of a random variable representing the amount in the envelope you picked" but later on "expected value of a random variable representing the amount in the envelope you picked provided that you picked envelope with more money" and "expected value of a random variable representing the amount in the envelope you picked provided that you picked envelope with less money".
Error comes from splitting reasoning for two cases and failing to factor in the condition on which you split in your further calculation of the cases.
If you solve some equation and you have to split your reasoning in two (or more) cases, the while reasoning those cases you have to remember the condition that you assumed for given case and factor it in (possibly toss away some solutions).
I'd like to see some day less one dimensional way of writing down mathematic reasoning so one can see how information flows through through the course of a proof and errors like this would show up more easily.