Answer
An atom wants to form an octet or duet because an atom always wants to be in the most stable form. For any atom, stability is achieved by following the octet rule or duet rule, which is to say all atoms (with a few exceptions) want 8 electrons (octet) or 2 electrons (duet) in their outermost electron shell just like noble gases.