Countries are sovereign, a Nigerian person living in Nigeria is only beholden to laws of Nigeria.
In your world, you can accuse someone who lives in Mongolia of a crime that doesn't even exist is Mongolian legal system, such as some peculiarities of US copyright or packaging of lobsters. You seem to think they should be flown to the US to be tried at your convenience to in a language they don't speak, in a legal system they don't understand at their expense?
You could prosecute him in Australia for hacking in whatever form it broke Australian law. How can any non-US citizen be held responsible for some vague 'damage to US national security' if they have nothing to do with the US? Why should a hypothetical person living in Nigeria be responsible for US, UK, Russian, Saudi, Israeli and everyone else's national security?