TAPintoTravels - It has been a tradition since 1940 and has roots in acts of defiance.
The 1940 Federal Flag Code specifically forbids it. The tradition formally began in 1936, when U.S. Olympic Committee determined not to observe the Olympic tradition of dipping national flags to dignitaries in protest to Nazi Germany. Although legend has it that the tradition began in 1908, when a defiant Irish-American failed to dip our flag to the Union Jack. Perhaps, it was motivated by the Irish will to break from the United Kingdom. We likely will never know.
This video gives some additional detail on the tradition.