You do realize that those Irish were not here illegally, don’t you? There was no real federal immigration law prior to 1882. There had been an anti-Chinese immigrant bill in 1875, but there was no general policy of limiting who could enter until the broad federal immigration law in 1882.
The same-sex “marriage” issue is perfectly analogous and you’ve made it even more so by introducing sodomy law. You’re correct that sodomy was illegal in 1868. However, it’s now been declared to be a fundamental right by deliberate misinterpretation of the 14th Amendment. Until that misinterpretation, it was a matter for the legislative branch. That’s also true of birthright citizenship under the 14th Amendment. The legislative branch determines the scope of what constitutes
such citizenship by their application of jurisdiction, which is different than location:
http://www.phxnews.com/fullstory.php?article=29991
My point does not hinge on whether or not they were here illegally (although some of them undoubtedly were, depending on the state they were in), it hinges on the fact they were foreign citizens on US soil without diplomatic accreditation - and more importantly, in countless cases without any naturalization status - and their children were still considered US citizens.