facts and circumstances - including the fact that she opted into a program that limits screening at CBP checkpoints but increases penalties for violations, and the fact that a limited screening program only works if there is high confidence that those in the program don't break the law.
And you also have to consider the fact that she alone is solely responsible for declaring that she didn't have any fruit with her, and then certifying that declaration. That is in no way the fault of the airline or CBP.