The recently concluded congressional negotiations over funding for border security may have succeeded in averting another federal government shutdown, but they represented a complete failure of vision when it comes to solving the problems that actually afflict our immigration system. Lawmakers argued over whether they were funding a “wall” or a “fence,” and disagreed as to how many tens of thousands of detention beds were being paid for, but the big policy questions were conspicuously absent.

For instance, at a time when the border region is experiencing an influx of asylum seekers from Central America who desperately need humanitarian protection, why are we pouring more money and personnel into an outdated enforcement apparatus constructed during a bygone era of large-scale migration of working-age men from Mexico? Why are lawmakers from both parties squabbling over how much to increase the nation’s detention capacity rather than creating processes that guarantee safe haven and due process for vulnerable children, women, and men fleeing persecution?

Leaving aside our poor treatment of Central American asylum seekers, the fact remains that we also have yet to address the fundamental causes of undocumented immigration. Our immigration laws have been out of balance for decades. The numbers and types of work visas available don’t match the numbers and types of workers that U.S. businesses actually need. Families seeking to reunify in the United States face wait times of many years before visas become available for those family members still living abroad. Trying to make up for these deficiencies in policy through an excess of enforcement will not fix the underlying problem.

It’s not that border enforcement is unnecessary, literally no one is saying that. But it needs to be focused on real threats. For instance, the criminal cartels that smuggle people, guns, drugs, and money back and forth across the border are a threat. But most of the people they smuggle—the people who want to work here or join their families, but who can’t get a visa—are not a threat. It makes little sense to create enforcement measures to counteract the unintended consequences of our own immigration policies. If lawmakers put half as much effort into revamping our immigration laws as they just put into enhancing fortifications at our southern border, they might find that fewer fortifications are necessary. Wouldn’t that be more efficient and effective?

Unfortunately, many lawmakers labor under the misconception that there is some magical amount of border enforcement that will be “enough.” According to this way of thinking, there is a “right” number of Border Patrol or Immigration and Customs Enforcement (ICE) agents that will guarantee security, and if we just keep adding more until we reach that number, we’ll finally be safe. But that’s not how border enforcement works in the real world. We live in a country where the immigration system is very much out of step with economic and social reality. Under those circumstances, our enforcement apparatus simply will not function properly—and thus far Congress and the president simply aren’t taking the blinders off to see that truth.