Lots of factors contribute to legislative failures in the past...
Partisian politics and election fears have in my opinion tainted congress as far back as I have been paying attention to national politics (about 20 years) but in this case, the lack of immigration reform is probably more due to the feds leaving it up to the states, and the states likewise being held slave to election concerns. Why else would the bankrupt (literally, they are financially bankrupt) California state govt continually fail to address a problem that is a massive drain on state and local resources, if there wasn't some purely political pressure forcing them to not do anything, and worse, not raise the issue as a matter of state and federal security?
The answer is a combination of re-election fear and political moneygrubbing. Very powerful groups in California, namely the mexican "rights" lobby (mostly the right for every mexican to come to the US for free stuff) and the growers associations, have been working hard to ensure that no substantive changes occur on the issue of border control and immigration law enforcement. They've been successful, and my opinion on why they've been so successful is that the politicians, even if not outright corrupt, are too concerned with getting re-elected to have any desire to confront the immigration issue on any meaningful level.
What would help is if both political parties would come to a gentleman's agreement to not use the immgration issue in the next election, and then go to work solving the problem. But that would require the politicians to not only do their job instead of chasing votes and campaign contributions, but it would also require them to trust their fellow congresscritters. And that won't happen because there is a strong leadership vacuum in congress and even if they did trust each other, someone, whether it's an up and coming wannabe congressman or the media, would turn any decision on the issue into a mass political suicide pact.
So nothing gets done, and more emergency rooms in so cal go out of business, more illegals claim citizenship benefits as "rights" (since when is free health care and a drivers license a "right"?), and the country continues to go down hill while congress quivers in fright.