That's a somewhat specious argument, because the ability to illegally obtain weapons is made easier by lax gun laws, and the guns that make it to the illegal market, by and large, start out as firearms that are legally sourced from the manufacturer. The patchwork of gun laws means that states with the least restrictive laws for purchasing guns become the source of weapons for crimes in states with more restrictive laws. Ironically, the less rational gun rights advocates obliquely reference this in an often-heard argument that high gun crime rates in restrictive areas is proof that gun regulation simply doesn't work, as opposed to the argument that more uniform restrictions are needed. More uniform laws that set the bar at the more restrictive level are universally opposed by politically active gun advocates.
At the state level, more guns typically means more crime and more death, researchers have consistently found. So some states have enacted stricter laws to limit gun purchases and to keep firearms from falling into the wrong hands. But these efforts can be undermined by the free flow of guns across state borders, some of it legal, some of it not.
Data from the Bureau of Alcohol, Tobacco and Firearms underscores this point: In 2014, ATF traced the source of over 170,000 guns used in crimes in the U.S. And well over a quarter of them -- 28 percent -- were used to commit crimes in a state other than the one they were purchased in. The map below shows which states these border-crossing crime guns came from.
Washington Post: Where guns used in crimes come from
In addition to this initially legal purchase, but then circumvention of stricter gun laws, you also have the illegal guns that are legally purchased, and then stolen from households. Laws that try to impose restrictions and enforcement on how firearms are secured in the home are also opposed.
More than half a million firearms are stolen each year in the United States and more than half of stolen firearms are handguns, many of which are subsequently sold illegally. {Philip J. Cook & James A. Leitzel, “Smart” Guns: A Technological Fix for Regulating the Secondary Market 7, Terry Sanford Institute of Public Policy, Duke University, Working Paper Series SAN01-10 (July 2001)}
Giffords Law Center To Prevent Gun Violence: Statistics on Gun Trafficking & Private Sales
In addition to that, you have measures that have been passed that make it more difficult for police, the FBI and the ATF to enforce the laws that are on the books.
The ATF is not allowed to maintain a computer database of gun transactions. They are restricted from how often they can inspect any dealer, which does not allow them to focus on problem dealers, which are involved in a hugely disproportionate number of guns winding up in the wrong hands. There are also massive, intentional loopholes in existing laws like ones that allow circumvention of background checks at gun shows for private sales.
For example, under current laws the bureau is prohibited from creating a federal registry of gun transactions. So while detectives on television tap a serial number into a computer and instantly identify the buyer of a firearm, the reality could not be more different.
NY Times: Legal Curbs Said to Hamper A.T.F. in Gun Inquiries
And, finally, the argument that we should not have laws because only the law-abiding will comply with them is a patently absurd standard, since that is true for each and every law ever created, no matter how correct and effective, or how pointless and poor-thought.