We don't. In intro physics we say it's constant because the students are too dumb to understand differentials. If you take a calculus based physics you'll usually see gravity as a function of altitude, typically covered as a brief aside in Halliday & Resnick. If you pay attention, you'll notice NASA picks launch locations that are high in altitude due to lower g-force to overcome.