The visa waiver program very cleary prohibits what he intended to do, so this was entirely his own fault and immigration was entirely correct.
But given the flammable nature of any post that mentions H1-B around here I thought it important to point out those were not involved. Plus, as we're usually fairly quick to lambaste others (as in "the world beyond Iwethey) for factual errors...