It is illegal to drive.
Correct. If you do not pass a test and acquire a license which permits you to drive it is illegal to drive. Any more stupid comments from you tonight, you idiot?
Certain government agents are authorised to assassinate foreign targets. That does not mean murder is legal you fool. It means the government is giving you specific permission to do something which would ordinarily be an offence.