Perhaps the least-controversial issue in American politics is the idea that we should hand out more work permits to high-skilled foreigners, particularly people with STEM degrees. Not everyone thinks this is a good idea, but the consensus around it is pretty widespread. So why doesn't it happen?
Well, roughly because there's no political percentage in writing a bill that passes. Increased immigration of foreign technical experts isn't just widely popular among policy analysts and opinion leaders, it's a key priority for high-tech companies. So legislators have the goal not so much of doing what the tech companies want, as trying to structure the situation so as to align the tech companies with their partisan interests. So Texas Republican Lamar Smith's challenge was to write a bill that did what the tech companies wanted (more visas for skilled foreigners) but that wouldn't actually pass the House of Representatives. He took a two-step approach to this. One was to ensure that each new visa for a skilled foreigner would be offset by one fewer visa allocated under the current system. That helped gin up Democratic opposition. Then the House leadership ensured the bill would be introduced under rules that required a two-thirds vote for passage. The combination of the ruleset and the poison pill was sufficient to achieve Rep Smith's objective—overwhelming GOP support for a bill tech companies love and that failed in the House.
Conversely, the way Democrats like to play this issue when they have the majority is by linking increased immigration of high-skill foreigners to a broader comprehensive immigration reform package that creates a path to citizenship for current undocumented residents. That way it's Republicans who block what the tech companies want.
One moral of the story is that everything about Congress is terrible. Another moral of the story is that American politics is both more and less polarized than it seems. Less because it's not actually true that Democrats and Republicans disagree about everything—the polariztion of voting patterns is in part an artificial construct of agenda control. Party leadership tries to make sure that the bills that get voted on unify their caucus, so there may always be hidden points of consensus. But we're also more polarized than it seems. You as a citizen might be a Republican who finds that he agrees with his Democratic friends about various things and wonders why members of congress can't just cut the BS and do the same. The answer is that these agenda-control factors are very real. Any actual legislative proposal has to make its way through the process, and the process is generally not oriented toward passing bills. Democrats and Republicans both favor increased high-skill immigration, but neither party's leaders have a particular desire to pass a bill which hands out the visas. The idea is, instead, a pawn in a larger chessgame.