It was not random.
Background: The shuttle data processing system was quad+ redundant, not triple. There were four Primary Avionics Software System (PASS) computers and a completely independent Backup Flight System (BFS) computer with totally different software. Each PASS computer controlled a "string" of avionics equipment (some really critical avionics such as main engine controllers were connected to all 4 strings and performed voting at the avionics box level). The BFS just listened to what was going on and did its own calculations in case of need.
Normally the PASS computers check each other and a bad one (defined as not agreeing) is voted out of the redundant set. Voting results were displayed on the CAM matrix on the cockpit panel in front of and above the commander's head. This matrix of lights displays graphically how each computer can cast fail votes against any or all of the others.
A failed computer's string can be assigned to a different computer if necessary. If all four of the PASS computers disagreed simultaneously, each computer would vote the others out resulting in a loss of flight control. (Each would still be controlling its own string based on what it thought was the right thing to do.) The crew would then engage the BFS by pressing a button on the rotational hand controller, and the BFS would take over all 4 strings all by itself.
There are other engage scenarios other than a total set breakup. For example, if 2 sets of 2 PASS computers agree with each other, but not the other 2, you would be in a "2+2 set split" and might have to engage the BFS if it was not quickly apparent which pair was wrong.
This is a brief summary. For more detailed information, refer to the Shuttle Crew Operations Manual pages 6.8-8, 6.9-1, and the DPS section 2.6.