Ag check, ok I get that but why are they really there?

"Hi where are you coming from?" How does that stop illegal produce from entering the state?