Airlines issue their flight schedules in most cases months ahead of time. There is no reason for TSA not to know how many flights are using each airport at a given time and to set staffing levels according.
Outside of major, sudden schedule changes, there is no reason for TSA not to be able to handle a known amount of passenger flow.