OSX Mail how to mark message as not junk
It seems iCloud is marking the message as junk using its algorithm. I don't believe you can adjust this from within the Mail.app. You will need to log into iCloud.com, enter Mail, find the particular message in your Junk Mail folder and then with the message selected, select the gear menu and you should be able to Mark as Not Junk.

To recap, as iCloud is flagging message as junk you must unflag message within iCloud.