Why do ionic compounds dissolve in water?
Well, for a start they don't all dissolve.
Some ionic crystals display considerable solubility in water. Water is a protic, dipolar solvent, i.e.
However, anions with more than the one unit electronic charge, i.e. oxides, phosphides, carbonates, sulfides, TEND to be quite insoluble. Anyway, chemistry is an experimental science, and you usually have to determine solubility by experiment.