Why was the 737 main rudder servo valve’s vulnerability to causing uncommanded reversals never discovered in testing?
After the accident the NTSB did very extensive testing on the PCU to determine the cause of the failure. In addition to the flight 427 PCU they tested new units, units that had been removed from other aircraft, and the units from three other crashes (SGR517, UAL585 and SLK185) as well as one selected by Boeing that had minimum tolerances.

They subjected the units to numerous tests. They could not get any of them to fail under any conditions expected during flight. The only test they could get a failure on involved an extreme temperature differential of injecting very hot hydraulic fluid suddenly into a very cold PCU. The report states "The extreme temperature differential produced during this test condition would not be expected during normal flight operations." (NTSB report page 79)

All of the PCUs passed the testing procedures for certification even after the failure testing. The temperatures of the PCU and hydraulic fluid on a 737 during flight were tested by Boeing and did not match those used for the testing. 

So the PCU can only be made to fail under specific, fairly unrealistic conditions that would not be expected during flight. There was no evidence that those temperature conditions were even present during any of the flights where PCU failure was suspected. There was no reason for testing the part during design or certification in conditions that would not be expected to occur.