They aren't illegal. The US has long had an open door policy for Cubans who manage to make their way there first as part of the Cuban Adjustment Act of 1966 and then later as part of the amended "wet feet, dry feet policy" of 1995. They've qualified for expedited legal permanent resident status  until now.