I'm no fan of Musk, not by a long shot. Working in the aerospace industry, the vast majority of us have an extreme dislike of the guy, especially for stealing credit.
But what SpaceX does for hiring is correct. This wasn't them arbitrarily deciding things, pretty much every aerospace company that does work with ITAR or EAR material gets told that American citizenship is required if the person will be anywhere near that kind of material. Even if your job function isn't related, if there's a chance you can see it you need to be able to legally do so.
Seems strange for the DoJ to go after just SpaceX in this one since I know LHM, Boeing, NG, Raytheon, etc, if you're in a facility that has ITAR/EAR stuff you need to be a citizen.
Does ITAR apply when it's independently developed product for commercial use like SpaceX, as opposed to some form of government owned IP with those other companies?
I'm sure there's differences. I would think SpaceX has wayyy less export controlled info, so hiring foreign nationals shouldn't be a deal breaker.
ITAR technically applies to all US Citizens, the only exception I'm aware of is in a university research setting. The text of the law is pretty short and boils down to anything that the US Government deems military technology or technology that can be used against the US must remain within the US unless written permission to "export" that technology is granted by the department of state. In this case "export" means the information leaving US soil or where you can't prove that the information hasn't left US soil. So if you're talking about some controlled technology in the middle of nowhere Kansas and happen to be next to some German tourist? Boom: Export.
From there you find yourself dealing with EAR on exactly what counts as an export and how to handle the export process. Exports happen all the time legally but they're all funneled through the DoS. If you don't control your exports the DoS starts getting fine-happy and if you do it enough times your company gets disbarred so all those sweet sweet over charged contracts that Musk likes to hide and distract from go away.
One method of controlling your export is to make sure that US citizens are the only people in your facility. That's why SpaceX's policy makes sense
From briefly having worked on a project where this was a relevant issue, and I had to throw good people of foreign nationality off the team due to higher up NASA decisions: ITAR also becomes relevant when you want to access data and hardware that is ITAR regulated for use in your mission. This is the case for all space missions -- even for SpaceX, who likes to do things in-house -- since the advanced electronics, alloys, etc. will come from elsewhere and fall under regulation.