Many types of immigrants and visa holders, if they are authorized to work or to received taxable payments in the USA, would be eligible to get Social Security numbers.
Even foreign students with F-1 student visas may be given Social Security numbers. In some cases there are legitimate Social Security cards with the verbiage "NOT VALID FOR EMPLOYMENT" on them, and these would still carry valid Social Security numbers that is good for banking and getting a loan.
It's complicated, which makes do diligence and due process even more important when messing with it.