Here's why:
* Ionic compounds are formed by the electrostatic attraction between oppositely charged ions.
* Chlorine is a nonmetal and has a high electronegativity, meaning it tends to gain electrons to form an anion (negatively charged ion) with a charge of -1 (Cl⁻).
* Lithium is an alkali metal and has a low electronegativity, meaning it tends to lose electrons to form a cation (positively charged ion) with a charge of +1 (Li⁺).
Therefore, when lithium and chlorine react, lithium loses an electron to become Li⁺, and chlorine gains an electron to become Cl⁻. These oppositely charged ions attract each other and form an ionic compound called lithium chloride (LiCl).