Because neither is that hard. Telling Terrell to change the code isn't hard. He would have to know to tell him, though. Terrell was compliant but not offering suggestions, only following orders. And if it takes hardware swaps to change the code, they must have the hardware aboard, else Spock wouldn't worry about the code being changed.