We propose a novel origin of magnetic anisotropy to explain the unusual magnetic behaviors of layered ferromagnetic Cr compounds (3d(3)) wherein the anisotropy field varies from less than or similar to 0.01 to similar to 3 T on changing the ligand atom in a common hexagonal structure. The effect of the ligand p orbital spin-orbit (LS) coupling on the magnetic anisotropy is explored by using four-site full multiplet cluster model calculations for energies involving the superexchange interaction at different spin axes. Our calculation shows that the anisotropy energy, which is the energy difference for different spin axes, is strongly affected not only by the LS coupling strength but also by the degree of p-d covalency in the layered geometry. This anisotropy energy involving the superexchange appears to dominate the magnetic anisotropy and even explains the giant magnetic anisotropy as large as 3 T observed in CrI3.