Octet rule states that elements tend to combine in such a way that each atom has eight electrons in its valence shell. Why only 8 electrons?
Because noble gases have 8 electrons in their valence shell.
Since all noble gases have 8 valence electrons and they are highly stable than those elements with fewer valence electrons, the octet rule sticks with 8 electrons.