Why are some material nodes connected to themselves?
The node is not connected to itself, it is muted. You do that to a node by pressing M. The red line indicates a "pass-through" - the input goes straight to output and the node is disabled.

I would guess the script that creates the node network always makes the full tree and just mutes the nodes that are not used in the original material, like normal mapping in this case.