This is the difference between a physical mixture like tea and a chemical substance like water. If one cup of tea has $$5 \, \mathrm{gm}$$ of sugar, and another cup of tea has $$7 \, \mathrm{gm}$$ of sugar, they are both called tea. But, if we take $$9 \, \mathrm{gm}$$ of water, we will always get 8 gm of Oxygen.