In the 1990s, the FBI and NSA did a lot of good work persuing organized computer crime operations around the world. Back then they also seemed to care more about the security of US infrastructure.
although the FBI is a domestic enforcement agency, Congress specifically gave it the ability to hack any computer anywhere in the world.
Despite whatever concepts you have ever heard about any agency's mission or limitations, Congress has the ability to delegate tasks to whatever agency it thinks have resources, and then those laws stay on the books.