This does not mean that it was sexually transmitted. You can get it a couple of different ways and just because you have it does not mean you pass it.
Your partner either had a false negative, you had a fasle positive (both rare), partner got it, gave it to you, but took medication to clear it up or you got it and never passed it on.