As the trial of the "Times Square bomber" showed us. He swore an oath of loyalty to the United States when he received US citizenship. In court, he admitted to taking the oath, and said, "but I didn't mean it." An oath, any oath can only mean something if the oath-taker is serious about taking the oath and discharging its obligations honestly. Otherwise it only helps define penalties after the fact--that is, after the damage has been done. There is also the matter of many countries allowing dual citizenship but not allowing their citizens to swear an oath of loyalty to another country. The US is one of those countries.
Iranian parliamentary panel gives conditional nod to nuke deal (Reuters)
from the article: ANALYSIS / Lieberman's loyalty oath isn't unconstitutional, it's unwise