Ab initio theoretical description of the interrelation between magnetocrystalline anisotropy and atomic short-range order