Private businesses do lots of R&D and it results in better technology. Would I like all R&D to be government subsidized and public domain? Sure. But that isn’t how the world works.
Keeping them in a domestic company for a while is a greater benefit to the U.S. than it would be if they went back to China and developed that technology,
As for voluntarily giving it, of course they wouldn’t voluntarily give it. That’s an entirely separate issue.