mathutils.geometry.intersect_ray_tri()
I'd say it's this bit

    dir = camera.location - pointer.location
    intersections = []

    for face in bm.faces:
        verts = []
        #print(face.index)
        for vert in face.verts:

            loc = obj.matrix_world * vert.co
            verts.append(loc)

        dir.negate()
        found = geometry.intersect_ray_tri(verts[0], verts[1], verts[2], dir, camera.location, True)
        intersections.append(found)


dir.negate() is being called for each face, effectively flipping the the ray on each iteration, giving a 50% chance of hitting the tri when it is in camera to pointer ray path.

Suggest setting 

dir = (pointer.location - camera.location).normalized()


in the first place, and removing dir.negate().