Doing this without compensation is ABSOLUTELY doing something wrong. Maybe not necessarily tortious, but certainly unethical and indicative of someone who should not be trusted in a business relationship. The YC company made a mistake and is sticking someone else with the bill.
FWIW, There's a certain amount of "foreigners are expendable" mindset that seems to exist in the American tech sphere that might factor into this situation as well...