Why don't phosphatases both add and remove phosphate groups if enzymes catalyze reactions in both directions?
I think the description of enzymatic reactions as 'reversible' is potentially a bit misleading. It might be better to think of enzymes as agnostic to reaction direction.

The big missing piece is the difference in free energy of the reaction itself. Reactions that remove a phosphate group are energetically favorable in biological conditions. A phosphatase will effectively never add a phosphate group back because one would have to supply additional energy to make the reaction proceed in that direction.

Phosphatases catalyze a reaction that results in a free phosphate ion. However, kinases that add phosphate groups are catalyzing quite a different reaction, where a phosphate group is lost from a molecule of ATP which becomes ADP. This reaction is also energetically favorable, and the reverse reaction does not occur.