Nick Leghorn has a piece at The Truth About Guns entitled "The One Regulation U.S. Gun Makers May Not Want to See the Trump Administration Change." In actuality, what he is discussing is the "sporting purpose" test set out in 18 U.S. Code § 925(d). Leghorn contends that "[t]he intent [of the test was] to appease traditional hunters and sportsmen (frequently referred to as 'Fudds'). This law assured them a supply of foreign-made bolt-action rifles and break-action shotguns, while keeping scary black guns from entering the U.S. market."
While a nice theory, it isn't quite accurate. The intent was not to keep scary black guns from entering the U.S. market, but to keep out scary bolt action Enfields, Carcanos, Mausers, and so on, as well as inexpensive handguns.
As with most U.S. gun control laws, we have to look at Europe as the inspiration. The "sporting purpose" had its origin in post-WWI Europe to prohibit civilian ownership of military weapons in order to ensure a government monopoly on weapons on effective armed force to counter the various dissident and communist movements spreading across the continent.  The exception for hunting rifles and shotguns was intended to mollify certain constituencies: hunters, sport shooters and the industries dependent upon them.  Although the term "sporting purpose" was not used in the National Firearms Act (NFA) of 1934, the idea, nevertheless, was largely implemented via the restrictions on machine guns and destructive devices. 
The term, itself, however first shows up on the 1968 Gun Control Act (GCA).  Although the ultimate root of the GCA was the 1934 NFA and 1938 Federal Firearms Act (FFA), the immediate genesis of the GCA was a bill proposed by then-Senator John F. Kennedy to ban the importation of surplus military arms.  The legislation was ostensibly intended to be protectionist--to restrict the importation of foreign made arms, the majority of which were surplus. However, all Congress would do at the time was to prohibit the re-importation of American military arms. "The flood of imports continued, fueled by surplus World War II firearms and inexpensive pistols and revolvers." 
In 1961, Sen. Todd Dodd (D-Conn.), chairman of the Juvenile Justice Subcommittee of the Senate Judiciary Committee, directed the subcommittee staff to begin studying the sale of firearms through the mail.  After two years of study, Dodd introduced a bill that would require mail-order sales of handguns be accompanied by a notarized affidavit that the purchaser was over 18 years-old, and restricted the importation of surplus military arms. The bill was supported by the NRA and the firearms industry. 
After the assassination of President Kennedy with a mail order surplus military rifle, Dodd amended his bill to include long-arms. This too was supported by the NRA and the firearms industry.  The bill died in committee 1964, but was reintroduced with even more restrictions in 1965. However, by this time, opposition had begun among NRA members:
Negative response by the membership precipitated a subsequent reversal of direction by the NRA leadership. This uprising by a significant portion of the NRA membership owed much to the development of a specialized gun press that catered to the most avid of gun enthusiasts. The editorial staffs of magazines such as Guns, Guns and Ammo, and Gun Week inalterably opposed gun control in any form and benefited from heightened interest in gun issues. By 1965, the leadership and membership of the NRA divided along a fault line separating those tolerant of moderate increases in gun control from those opposed to any significant change in the law. In 1967, under pressure--or direction--of the Johnson Administration, Dodd introduced an new bill that not only outlawed mail order sales of firearms, but prohibited all interstate sales between individuals. This bill stalled, but was saved by the assassination of Martin Luther King, Jr., after which it was passed by the Senate. Serious resistance was expected in the House of Representatives, but the timely assassination of Robert Kennedy provided the additional temporary public support to see some form of gun control legislation be passed, although the final law did not do everything that the Administration wanted.  In fact, upon signing the GCA in October 1968, President Johnson stated:
Congress adopted most of our recommendations. But this bill—as big as this bill is—still falls short, because we just could not get the Congress to carry out the requests we made of them. I asked for the national registration of all guns and the licensing of those who carry those guns. For the fact of life is that there are over 160 million guns in this country—more firearms than families. If guns are to be kept out of the hands of the criminal, out of the hands of the insane, and out of the hands of the irresponsible, then we just must have licensing. If the criminal with a gun is to be tracked down quickly, then we must have registration in this country. The voices that blocked these safeguards were not the voices of an aroused nation. They were the voices of a powerful lobby, a gun lobby, that has prevailed for the moment in an election year. Thus, we see that the "sporting purpose" test or restriction was not to appease "fudds," but originated in the totalitarian impulses of those seeking to impose gun control, to offer protection to U.S. manufacturers, and represented the best push back from gun owners that was possible at the 11th hour, after nearly a decade of exploding violent crime and several high status political assassinations and a general lack of opposition from the NRA.
 Carter, Gregg Lee, ed. Guns in American Society: An Encyclopedia of History, Politics and Law, Volume 1, pp. 548-549.
 Id. at 549.
 Vizzard, William. "The Gun Control Act of 1968."
 Id. See also Shamaya, Angel. "NRA Supported the National Firearms Act of 1934". This latter article describes how the NRA supported most of the gun control legislation prior to the GCA, and even tried to mute criticism of the NRA by admitting that "[t]he National Rifle Association has been in support of workable, enforceable gun control legislation since its very inception in 1871." (NRA Executive Vice President Franklin L. Orth in American Rifleman, March 1968, p. 22).
 Vizzard, supra.
 Wikipedia, "Gun Control Act of 1968".