Do you have any references? That doesn’t sound true.
From dictionary.law.com:
illegal
adj. in violation of statute, regulation or ordinance, which may be criminal or merely not in conformity. Thus, an armed robbery is illegal, and so is an access road which is narrower than the county allows, but the violation is not criminal.
unlawful
adj. referring to any action which is in violation of a statute, federal or state constitution, or established legal precedents