I really feel bad for those workers. Essentially they are obeying coding slaves for the company until they eventually get their green card. They can not risk being fired, they will not ask for a raise, they can not easily switch to another job etc. etc.
A native worker like the author is less likely to put up with this kind of BS for very long.
This is unfair for both the foreign workers and native workers. Cases like this really show that the H-1B system is a total joke.