Is there a difference between murder and manslaughter? Apparently not because intent doesn't matter, right?
The phrase you're looking for is "mens rea". It applies to some laws (murder-type laws, for instance, distinguish between killing someone on purpose and by accident).
But, and it's a big but, mens rea doesn't apply to ALL crimes. Security violations do not require mens rea to be demonstrated in as part of the crime. If you accidently leave an "EYES ONLY President" (all the way down to Top Secret", which isn't actually all that high a security classification when you get down to it) type document lying about in Starbucks, well, you're going to be nailed to a tree whether you meant to or not.
Unless your name is Hillary, of course. Then the FBI will say something to the effect of "well, we can't find a prosecutor who would try to win the case, so we're not going to recommend prosecution"....