The reason for H1-b is to fill jobs that don’t have enough American candidates. When you overtly fire the Americans and replace them with H1-b workers, you are not protected by it. They even made the American workers train their replacements.
H-1B Is Designed to Allow Employers to Replace Americans with Cheap Foreign Workers
H-1B Is Designed to Allow Employers to Pay Foreign Workers Extremely Low Wages