The blood becomes alkaline when acid is lost, usually from the stomach, or when the kidneys hold on to too much bicarbonate.
Metabolic alkalosis comes from losing hydrogen ions or gaining bicarbonate. Vomiting or NG suction loses stomach acid (HCl). Other causes are diuretics, liquorice, primary hyperaldosteronism, Cushing's syndrome and Bartter's syndrome. Aldosterone is central: it reabsorbs sodium and excretes H⁺ and K⁺ in return, so fluid loss that switches on the RAAS worsens the alkalosis. Hypokalaemia also drives H⁺ into cells.