The search for new quantum phases, especially in frustrated magnets, is central to modern condensed matter physics. One of the most promising places to look is in rare-earth pyrochlore magnets with highly-anisotropic exchange interactions, materials closely related to the spin ices Ho2Ti2O7 and Dy2Ti2O7. Here we establish a general theory of magnetic order in these materials. We find that many of their most interesting properties can be traced back to the accidental degeneracies where phases with different symmetry meet. These include the ordered ground state selection by fluctuations in Er2Ti2O7, the dimensional-reduction observed in Yb2Ti2O7, and the absence of magnetic order in Er2Sn2O7.