The thing is, many repubs secretely (sometimes not so secretely) acknowledge that illegal immigrants provide a cheap agricultural labor force that is willing to put up with treatment that a citizen generally wouldn't. In other words, they are good for big business.
In addition, in recent years the Republican party has begun to court hispanic voters, recognizing that they make up the fastest growing demographic in many states. Since immigration is a key issue with hispanic voters, repubs are a bit torn on the issue.