In the solution then crystal, in the first example Li becomes Li+1 cation with one bonding positions, and Cl become Cl-1 ion, both having only one position so they can bond any way needed in 3D. However, a direct bond between them will not create a crystal, as a crystal needs an continuous chain (one must be open to the next set) to continue. You get Li-Cl single bond, and not crystallization.
Yet with H2O, the Cl-1 will bond width one H2O (hydrogen bond), and the another Hydrogen (in H2O) is available for crystal chain bonding. That is why H2O are needed to create a crystal. You get a +H-O-Cl.
The Li+ would bond to an outer electrons of the H2O, and again end the chain. In that way, we only have the H2O Hydrogen bonds, and get a chain +H-O-H+ with Li attached in the other hemisphere.
With regular H2O in crystal as +H-0-H+ with two bonds. That means that you get a crystals with chains at the corners of the cube (8 positions).
The H2O in 3D has two Contributing Hydrogen bonds (proton outward), and six receiving outer electrons. That leads to your conclusion that it would be 8H2O.
Yet, the Cl- ends the chain, Li+ does not. That means you get a chainable structure with just 2 H2O where two Hydrogen are ready for other Hydrogen bonds:
There is two open H+ for hydrogen bonding along the crystal chain in a clean 2H2O:LiCl structure. That makes this crystal possible with that low ratio (if build in that environment) as achievable.
However, Mg becomes Mg+2 with those bonding positions at endcaps. That means the Mg+2 always creates bonds to two H2O atoms at the H+ positions. The two contributing positions do not line up relative to the H2O H+ positions (or calc very well as attractive) as a double bond.
But, you cannot create a crystal without an H+ in H2O remaining open, so you get two H2O for every Mg, which then leads to 4 more H2O by hydrogen bonds.
The positions for Cl- still end the chain, so those can insert that pair anywhere; you can have a crystal ending one H+ in the Cl-1, and still build in the other three directions.
+H H+ O-H+ Cl-
+H H+ O-H+ Cl-
However, the +H bond to other H2O, so you get 2 direction from the Mg x 4 hydrogen H2O bonds = 8 H2O required for the second crystal. It cannot work with just 2H2O in the 3D structure.
That is why the MgCl2 requires a ratio of at least 8 H2O, so MgCl2:8H2O, not :2H2O.
The main quality of water for creating crystals is its creation of Hydrogen bonds at two diagonal corners of the Scrunched (104.5 bonding from ~66 nucleomagnetics inclination angle) Cube in the same hemisphere. In AVSC, the Hydrogen electron fills the Oxygen settling position. That leaves the Hydrogen as settling Proton outward, which can create the location for Hydrogen bonds at specific angles.