The reason why this normal function of government is contentious and the question of what Democrats have to gain politically from the continued illegal activity on the border are intertwined.
Like I mentioned in my comment on your question, powerful political interests in the United States, both Democrat and non-Democrat, have much to gain from lax border control and lax immigration enforcement, and the Trump administration is threatening to change those policies.
These powerful interests have great influence over the media, and so they've made the issue contentious in an attempt to stop the Trump administration from changing the current policies.
This article describes the biggest donors in detail, including Rupert Murdoch of Fox News, who has been pro-immigration for many years.
Keep in mind how fiercely both Democrat AND Republican politicians opposed Trump. Trump's campaign rhetoric about tighter immigration enforcement directly threatened policies beneficial to the interests supporting both Democrat and Republican establishment politicians.
Industrial and financial interests gain from the cheap labor that uncontrolled immigration brings. Agricultural industries directly rely on masses of illegal immigrants for cheap labor, as do construction industries to a lesser extent. Tech industries rely on masses of legal work visa immigrants to lower labor costs.
This chart provides a good breakdown of immigrants in the labor force but does not include illegal immigrant labor, so the numbers are probably higher.
Lower labor costs increase profits, which increase stock prices. Business owners and stockholders profit from this, and they contribute to the campaign funds of politicians to keep this source of profit going.
Here's an example of powerful pro-immigration Republican donors, the Koch Brothers.
Here's an article about big donors influencing the Democratic Party on immigration and other issues.
This article discusses the hundreds of millions of dollars big donors give politicians.
What the Democratic Party gains from illegal immigration is simple: More voters, and therefore more political power.
It generally works like this: Democratic politicians promise benefits and services to immigrants that American citizens and businesses pay for through taxation. In return, the immigrants, legal and illegal, are supposed to support Democrats.
The new governor of California proposes that illegal immigrants get taxpayer-funded heathcare.
Pew research concluding that illegal immigrants overwhelmingly support Democrats.
How Democrats gain from illegal immigration.
Democrat politicians refuse to condemn the crime of illegal immigrants voting.
Most Democrats think illegal aliens should vote.
Democrat Nancy Pelosi encourages illegal immigrants to vote for Democrats.
Article about how illegal immigrant votes might elect Hillary Clinton (bear in mind that any illegal immigrant voting is against the law).
DACA illegal immigrants surge Hispanic vote and turn Republican counties to Democrat.
As for illegal activity at the border besides illegal immigration, there's rampant speculation that Democrats benefit through working relationships with criminal organizations, but so far there's nothing in the mainstream media that offers substantial evidence of this.
It is worth noting that the Democratic Party has made use of people willing to commit criminal actions in its support, as revealed in this hidden camera expose' by Project Veritas.
Foval spends five minutes discussing how voters might be brought from outside Wisconsin to commit voter fraud, buying cars with Wisconsin plates to avoid looking suspicious. “We've been busing people in to deal with you f---ing a--holes for 50 years, and we're not going to stop now,” he says.
Democratic Party deliberately incites violence at Trump rallies.
Same from Washington Times.
A key Clinton operative is captured on camera saying, "It doesn’t matter what the friggin’ legal and ethics people say, we need to win this motherfucker."
New York Times article about it.
So that's why the the Democrats, the pro-immigration Republicans, and the industrial/financial interests care so much about the issue.
Here's why American voters care about the issue and are fiercely pushing back.
Mass immigration has kept wages flat while inflation has increased, inflicting economic pain on the American public.
Today’s real average wage (that is, the wage after accounting for inflation) has about the same purchasing power it did 40 years ago. And what wage gains there have been have mostly flowed to the highest-paid tier of workers.
Middle-class wages are stagnant—Middle-wage workers’ hourly wage is up 6% since 1979, low-wage workers’ wages are down 5%, while those with very high wages saw a 41% increase
US pay/ productivity gap; Real wages for typical worker flat since 1970s
Although immigration yields a positive net gain to domestic workers, that gain is not spread equally: it harms workers who are substitutes for immigrants while benefiting workers who are complements to immigrants.
The problem is that there is mass substitution of immigrant labor for American labor at all skill levels. Employers who exploit illegal immigrant labor benefit by paying lower wages, while American workers get displaced. It's the same for legal immigrant labor paid less than American workers. Even earlier waves of immigrants are negatively affected by the next wave of immigrants increasing the labor supply and therefore lowering wages.
That's why famous Latino-American labor activist Cesar Chavez vehemently opposed illegal immigration.
Even after the economy has fully adjusted, those skill groups that received the most immigrants will still offer lower pay relative to those that received fewer immigrants.
Bernie Sanders Again Links Low Wages With Immigration
Employers Exploit Unauthorized Immigrants to Keep Wages Low
What labor market changes have generated inequality and wage suppression?
Lawsuits Claim Disney Colluded to Replace U.S. Workers With Immigrants
Disney Fires American Workers To Replace Them With Outsourced Immigrants
Immigrants Find High-Tech Servitude in Silicon Valley
Foreign labor builds U.S. auto factories.
So working-class Americans are feeling the pain of mass immigration, and if they're not feeling pain themselves, they perceive that there's a problem, and they're understandably concerned about it.
Another important issue is crime.
America has its own criminals which it has enough problems with, and many Americans and immigrants living in America are angry with the government for failing to prevent illegal immigrant criminals from entering the country and committing violent crimes against Americans.
In California, reports indicate that Mexican gangs are waging a race war against American blacks. When black people bring these concerns to their elected officials, they are ignored, the border remains uncontrolled, and California cities declare themselves sanctuary cities for illegal immigrants. This is true despite the Democratic Party routinely portraying itself as the party that supports American black people. You can imagine the bitterness and resentment felt by many in the black community about this.
Acting on orders from the Mexican Mafia, Latino gang members in Southern California are terrorizing and killing blacks.
Mexican Mafia member ordered gangs to target blacks, police say.
Feds: Latino Gang Targeted Blacks.
Attack on family in Compton latest incident in wave of anti-black violence.
Ethnic cleansing against black people in Los Angeles (video, 6:48).
American prisons are filled with illegal aliens, and Americans and even immigrants, legal and illegal, are sick of being raped, murdered, and victimized by them. American taxpayers are sick of paying for their prosecution and incarceration costs.
An FBI crime study also shows heavy illegal alien involvement in criminal activity revealed these statistics:
75 percent of those on the most wanted criminals list in Los Angeles, Phoenix and Albuquerque are illegal aliens.
One quarter of all inmates in California detention centers are Mexican nationals, as are more than 40 percent of all inmates in Arizona and 48 percent in New Mexico jails.
Over 53 percent of all investigated burglaries reported in California, New Mexico, Nevada, Arizona, and Texas are perpetrated by illegal aliens.
63 percent of cited drivers in Arizona have no license, no insurance and no registration for the vehicle. Of that number, 97 percent are illegal aliens. 66 percent of cited drivers in New Mexico have no license, no insurance and no registration for the vehicle. Of that 66 percent, 98 percent are illegal aliens....
Those 55,322 illegal aliens had been arrested 459,614 times, an average of 8.3 arrests per illegal alien, and had committed almost 700,000 criminal offenses, an average of roughly 12.7 offenses per illegal alien.
MS-13, an extremely violent transnational gang whose motto is "Murder, rape, control", recruits from illegal immigrants living the U.S. and MS-13 gang members travel across the U.S. border with ease.
The Obama administration changed the focus away from rank-and-file illegal immigrants and toward trying to make big cases, hoping to make major conspiracy cases instead.
The result was a collapse in enforcement.
“ICE officers were no longer permitted to arrest and remove foreign gang members until they had been convicted of major crimes. Gang arrests by ICE plummeted from about 4,600 in 2012 to about 1,580 in 2014,” Ms. Vaughan wrote.
She said those changes came just as the gangs were getting an influx of new members thanks to the surge of UAC that began in 2012 and was in full bloom by 2014, drawing tens of thousands of young males from Central America into the U.S. That’s the key recruiting pool for MS-13.
“According to local gang investigators, these gangs have been aggressively recruiting recently arrived Central American children as young as 10 years old,” she wrote.
MS-13 gang members gaining numbers by recruiting illegal immigrants
Crime committed by illegal immigrants goes on and on and on, and Americans and immigrants get murdered, raped, and robbed, but American politicians refuse to deal with the problem. Then Trump came along and at least brought the problem into the spotlight. You can imagine how people felt when their concerns were finally seriously addressed.
So what you have is the powers-that-be and their compliant media telling the American people that the government shouldn't enforce its own laws, that illegal immigrants should get services that Americans pay for, and that Americans shouldn't complain about immigration-induced stagnant wages, getting laid off to make way for immigrant labor, and getting victimized by immigrant crime, and that anyone who wants to stop illegal immigration or even reduce legal immigration is racist.
Large sections of the American population have had enough, and they support the Trump administration's goals of building a border wall to at least make it harder for people to illegally enter the U.S. and enforcing existing immigration laws. The problem is so bad that people are no longer cowed by the media shaming them or the politicians' platitudes.
The Democrats, the anti-Trump Republicans and the economic interests are determined to keep the advantages they gain from weak borders and immigration non-enforcement.
That's why it's so contentious.
The OP asked this additional question:
"... surely democrats are equally effected by the criminal behaviour as well ?"
Yes, Democratic voters and party members are affected by the criminal behavior, and they frequently suffer more from it.
The black community is strongly Democrat, voting 88% for Hillary in 2016, but they have seen their wages suppressed and they're the ones who have been losing jobs and suffering a campaign of racist killings by Mexican and Central American gangs.
Latinos are also strongly Democrat, with 66% of Latinos voting for Hillary in 2016, and their wages get suppressed and gangs and drugs endanger their neighborhoods too.
Immigrant communities in the U.S., very pro-Democrat, are frequently harmed more by crime, since gangs from other countries prey on their own communities first, and illegal immigrants in these communities are afraid to go to the police.
Union labor has traditionally been a strong Democratic voter bloc, but they have suffered from the economic effects of mass immigration and illegal immigration (among other economic policies, both Democrat and Republican). This is why Trump was just able to break through Hillary's 'Blue Wall' of the heavily unionized states of Michigan, Pennsylvania, and Wisconsin.
Michigan is where Detroit is, which was the heart of American manufacturing for decades, but is now an urban wasteland of abandoned neighborhoods and empty factories. Pennsylvania is home to Pittsburgh, a massive steel production center hit hard by cheap imports. Wisconsin has manufacturing and agricultural industries, and those workers were affected by cheap immigrant labor.
Imagine how the workers in these states responded when Trump went out on stage and declared he was going to bring jobs back.
Michael Moore, a completely anti-Trump and pro-Democrat filmmaker, understood this because he did a lot of documentary work in those states. He explains it very well:
Michael Moore's speech warning about Trump and why people why would vote for him.
So, we have the Democratic Party publicly enacting and supporting policies which harm many of their own voters, and many of their voters see this. Still the Democrats persist. It's about the powerful doing what's profitable for them, regardless of their party, regardless of how it affects the people.
The trouble is that the Democrats have marketed themselves as the party that takes care of the people for decades. The Republicans, who are just as complicit in all of this, have always had the reputation of being the party of the rich.