A lot of effort goes into ensuring that you don't randomize the game into an unwinnable state. Many of these games are so well known by speedrunners and fans, that they know what items are required for each part of the game. The Link to the Past randomizer, IIRC, actually gives you the option to randomize the game in a way that requires no glitches, or randomize the game so that glitches may be needed.