KH (carbonate hardness) is the water's buffering capacity — how well it resists changes in pH — so a healthy KH keeps your pH stable, while a near-zero KH lets pH crash.
KH is the safety net under pH. When KH runs out, pH can drop suddenly (a "pH crash"), which is dangerous. Tanks with lots of driftwood, or that go a long time between water changes, can slowly use up KH.
If your pH is swinging or crashing, testing and shoring up KH is usually the real fix — not adding pH-up.