If they were breaking no laws then why were they sent back?
They were sent back for hijacking, which is a crime. Cubans emmigrating to the US are not guilty of a crime, unless their crime is something else (like hijacking.)
Is it not illegal for foreign citizens to come to our country without going through proper channels?
No, it is not illegal for Cubans to come to this country without any paperwork. The only proper channel they have to go through is the Straights of Florida.