Atoms combine because they are all working toward getting 8 valence electrons, except for noble gases. It is in their nature.
If you need a better explanation just ask in the comments.
Happy to help! Please mark as BRAINLIEST! Thanks