Simply put, the numbers are different because the size of each jurisdiction’s boundaries varies. For example, the city of Tomball’s population reflects the number of residents within about 12 square miles. Tomball ISD’s boundaries, however, encompass about 83 square miles, according to the district’s website.
As TISD’s boundaries are much larger geographically, this accounts for the larger number of students enrolled than total city residents. At last count, the city of Tomball included 11,353 residents while TISD enrolled 15,934 students in fall 2017.
The same thing is true for Magnolia. The city of Magnolia only encompasses about 4.5 square miles, but Magnolia ISD spans about 150 square miles. As a result, the city’s population—1,857 residents according to the U.S. Census Bureau—is significantly less than MISD’s enrollment of 12,993 students.
The number of residents within a city’s extraterritorial jurisdiction are not counted in the city’s population.