There are two other ways besides the “dick in the water bottle” theory that these two people can have the same STD. One is that they had sex and the other is that it’s coincidence (I suppose modern lab analysis can probably connect two infections by specific strain/genome if that was done but that’s probably expensive).