You are correct about having no obligations, but as a company that is based in US and employs a large US-based workforce it benefits a lot from US itself being successful.
In Today's World, Countries should be grateful to a company when they employ people. There is no lack of highly skilled workforce in entire world. US with it's abysmal education system should be grateful to intel that it attracts semi conductor industry talents from all over the world which maintains US's hegemony in the world. If intel doesn't employ them, they would start companies like TSMC in their countries, hell if US didn't discriminate against Asians in 1980s maybe TSMC wouldn't even exist in the first place. Benefits that US provides to companies is way less than benefits companies provide to US.