Because it doesn't: socialism has nothing inherently to do with immigration issues. The reason various individuals either support or reject immigration is largely an individual conclusion rather than an integral part for the ideology. I'll even run down some reasons why one might support (usually its more a matter of tolerating immigration than actually WANTING more) or reject immigration from both the capitalist perspective and socialist perspective. Mind you, it's obviously more complicated than this, and there are reasons on both sides that stretch far beyond what I can mention in a single post.
From the socialist perspective, one might tolerate immigration as a show of solidarity among members of the working class: a rejection of nationalism, which is almost always a tool utilized by the far-right to solidify the power of the existing ruling class. They might also tolerate it as an accelerationist tactic in order to (theoretically) lower the standards for labor (wages, benefits, expendibility, etc) of the sedentary members of the working class, thus (theoretically) bettering the odds that the populace will resort to violent action to overthrow the systems that created such conditions (obviously I'm not really behind this premise, as it has no safeguards against the violence being simply racially targeted rather than seeking to change the material conditions that drives individuals to act on both sides).
On the flip side, a socialist might reject immigration on the basis that often the immigrant populations are often ideologically inert, providing the capitalist class with a workforce that is unlikely to achieve class consciousness in the traditional sense. They might also be against it as a rejection of accelerationism, seeing a (theoretical) drop in the standards for labor as being counterproductive for both the immigrant population (who face rivaling or greater exploitation among their new work than their work in their home country) and the sedentary working class (who lose the few inches reform got them). They might also do it for accelerationist purposes as well, believing that immigrants staying where they were originally from will force change to happen their more easily, likely through violent action if conditions are sufficiently bad.
A capitalist might tolerate immigration because it supplies a steady stream of expendible workers who will work for wages that leave them on the brink of starvation, are largely not protected by things like workers' safety, and can, at any point, be terminated and/or deported if they become too "troublesome." Immigrants to the capitalist allow them to dive deep into exploitative tactics that hadn't been otherwise possible for the last ~100 or so years. It also creates, when coupled with well crafted media coverage (and omissions), the immigration can be used to flair racial tensions, which ultimately divide the working class and allow exploitation of both sedentary workers and migrant workers to go on unnoticed, without fear of the two groups collaborating for mutual benefit.
A capitalist would really only reject immigration on a nationalist premise, which is mostly a choice of greater gains between "more profits and less hassle from borderline slave labor" or "control over the existing population so as to demand greater loyalty and, by extension, receive significantly less response from already existing (or, in most historical cases, expanded) exploitative tactics."
Either way, the capitalist elite gets their cut, and everyone else is left out in the cold to fend for themselves. That's why most people here don't find much value in talking about immigration: neither side of the debate brings about the changes that would actually solve the underlying problems.