That's nothing to do with SpaceX specifically. The same applies to any American company building long range rockets. The government classifies this as weapons technology, and so it falls under ITAR - the International Traffic in Arms Regulations [1]. And hiring a foreign employee (or even a multi-national employee) is considered equivalent to a transfer of the underlying technology to that individual's home country or countries. In cases where this would be unlawful, which is most, hiring such persons would be unlawful.
[1] - https://en.wikipedia.org/wiki/International_Traffic_in_Arms_...