That's what makes the 2-hour early 'rule' so egregious. Manipulating passengers to sit around in a Disneyland-priced mall because of the 1 in 5 chance the TSA screwed up their staffing that day.
I think Singapore has a pretty good experience worked out now, the immigration is automated just with an iris scan.
Additionally moving security to the gate rather than having a single security point for all flights also makes the wait here shorter and more importantly predictable.
If I'm just taking a cabin bag I always arrive 35-40 minutes before a flight and have had no trouble with time, normally enough time to grab a coffee too before boarding.