Coming back into the US there is usually a score (which is basically a rating of how much of a risk you are based on a multitude of factors that I'm not even going to begin mentioning here.)
If your score is low enough (aka not much of a risk) then you get right through with minimal hassle.
My dad used to work for DHS and was allowed to pull my "file" right before he left so I could see it. It was amazing to see what they had on there (and how little they were actually missing from my travels)