hydrochloric acid has only one acidic hydrogen atom that provides hydrogen ions in solution.
H+(aq) comes from HCl(aq)
These react with carbonate ions to make carbon dioxide and water, CO2 + H2O.
But to make water you need two hydrogen atoms, so you must use two mol of HCl per mol of carbonate.
2H+(aq) + CO32- --> CO2 + H2O.
All acids react with carbonates in this way (although it is actually a two stage reaction, but that's for another day)