The System Keeps Its Mass
When a chemical reaction happens, atoms do not vanish or appear from nothing. They are rearranged into new substances. That is why the mass of the whole system before a reaction equals the mass of the whole system after the reaction.