That's not how it works. The sending unit wires go the valve because that is where they are switched. There are only two wires going to the valve to control it, they are the valve motor wires. It's wired just like a electric window motor. The polarity is reversed on these two wires by the dash switch, and that moves the motor back and forth to move the valve guts.
But there is also a rotary switch with contacts inside the valve. As the motor moves the valve spool, it also turns this rotary switch, and this switch switches the sending unit wires. It works much like the electric transfer case motors, which move the transfer case shifter and also have a rotary electric switch inside which tells the shift computer what position the motor is in.