Here's why:
* Sodium (Na) is a metal with one valence electron. It readily loses this electron to achieve a stable electron configuration.
* Chlorine (Cl) is a nonmetal with seven valence electrons. It readily gains one electron to achieve a stable electron configuration.
* When sodium loses its electron, it becomes a positively charged ion (Na+).
* When chlorine gains an electron, it becomes a negatively charged ion (Cl-).
* The opposite charges of these ions attract each other strongly, forming an ionic bond.
This strong electrostatic attraction between the positive and negative ions creates a stable crystal lattice structure in sodium chloride.