I did some reading and this is what I found. Giving food away is not the loop hole. The law speaks of "food distributer" and makes no difference if the food is given away or sold. Example, on free Italian Ice day at Rita's they still need to be Department of Ag compliant. The "loophole" and it really isn't a loophole it is a legitimate exemption, is that the chili cook off is a run by a not for profit volunteer organization.
from the PA Dept Of Ag site;
Q: Are any food establishments exempt from the food employee certification?
A: The exemption categories are : (1) A food establishment that does not handle any potentially hazardous foods; (2) A food establishment that handles only commercially prepackaged foods and (3) A food manufacturer of non-potentially hazardous food. (4) An organization classified as tax-exempt under Section 501 (c)(3) of the IRS Code of 1986. (5) Food establishments managed on a not-for-profit basis by a volunteer fire company, ambulance, religious, charitable, fraternal, veterans, civic, agricultural fair, agricultural association or auxiliaries of such. (6) Food establishments managed on a not-for-profit basis by organizations supporting extra-curricular recreational activities for youth of all public, private, and parochial school systems.