  We address the interplay between stacking and interlayer exchange for
ferromagnetically ordered CrI$_3$, both for bilayers and bulk. Whereas bulk
CrI$_3$ is ferromagnetic, both magneto-optical and transport experiments show
that interlayer exchange for CrI$_3$ bilayers is antiferromagnetic. Bulk
CrI$_3$ is known to assume two crystal structures, rhombohedral and monoclinic,
that differ mostly in the stacking between monolayers. Below 210-220 Kelvin,
bulk CrI$_3$ orders in a rhombohedral phase. Our density functional theory
calculations show a very strong dependence of interlayer exchange and stacking.
Specifically, the ground states of both bulk and free-standing CrI$_3$ bilayers
are ferromagnetic for the rhombohedral phase. In contrast, the energy
difference between both configurations is more than one order of magnitude
smaller for the monoclinic phase, and eventually becomes antiferromagnetic when
either positive strain or on-site Hubbard interactions ($U \geq 3$) are
considered. We also explore the interplay between interlayer hybrydization and
stacking, using a Wannier basis, and between interlayer hybrydization and
relative magnetic alignment for CrI$_3$ bilayers, that helps to account for the
very large tunnel magnetoresistance obvserved in recent experiments.
