The USB A plug and receptacle were designed to meet two key criteria: (a) cheap, and (b) robust. Together, these led to the plug-receptacle fit having very loose tolerances compared to other computer plug-receptacle pairs. It's usually cheaper to manufacture parts with looser tolerances, and the receptacles are less likely to wear or be damaged to the point of unusability. This loose tolerance led to the choice of a rectangular plug. A keyed plug, e.g., trapezoidal like the older parallel and serial ports shown here:
would be dangerous with loose USB-style tolerances, since it might be possible to push the plug into the receptacle upside down and damage the receptacle (USB A plugs have a loose enough fit that they can be wiggled quite far side-to-side when fully inserted.) The rectangular plug and receptacle avoids this problem. For receptacles on the back of a computer which can't easily be seen, it's often difficult to tell by feel which way such trapezoidal receptacles are, and USB-style trial-and-error is often required. A potential problem with such trial-and-error, which would be made much worse by loose USB-style tolerances, is the risk of damaging the pins in a failed attempt to insert the plug (USB Micro-B suffers from this problem). USB A plugs and receptacles are designed so that the contacts are supported by a plastic "tongue" which protects them from such damage (and also pushes the contacts together when the plug is inserted, ensuring good contact even with the loose receptacle tolerance).
Obviously, it would be more convenient to have a rectangular plug which works both ways. The USB development team at Intel realised this, but a reversible plug would have required either twice as many contacts and wires (which would make cables more expensive) or fancier circuitry in the computer and device (which would make USB ports more expensive). They went for the cheap option. The cheap option worked. (This wasn't the only cheap option they chose - in the early USB standards, the speeds were much lower than FireWire speeds, but USB beat FireWire through simplicity and lower cost (and eventual improvements in speeds of USB, which made FireWire largely obsolete).
While the development team were aware of the potential annoyance of a one-way plug, it wasn't worse than existing plug-receptacle pairs. The various trapezoidal receptacles needed more careful alignment, and were rarely unplugged and re-plugged (typically, once plugging, they were screwed into place with finger screws). The most common non-screw secured plug was PS/2 (see image linked above), which was round and allowed to used to attempt to insert the plug in any orientation - that USB A offered only two orientations to try was an improvement in usability.
considered one of the worst mistakes in the history of industrial design
While the inconvenience is well-known, and noted by the developers, a keyed plug or a both-ways plug would not have solved the whole problem. Note the "USB paradox": there are only two ways to try to insert a USB A plug, but it usually takes at least 3 attempts. While physicists will often "explain" this by claiming that it shows that USB A plugs are spin-1/2, it's due to the tolerances. The loose tolerances make it quite possible - common, even - to attempt the insert the plug too high, too low, or at an angle, causing it fail to insert even in the correct orientation.
The USB C plug and receptacle bring two-way plugs into USB, in principle solving this problem. However, USB C (or at least some manufacturer's implementations of USB C) appear to much more prone to damage and affected by wear - the physical tolerances for USB C are tighter.
("Worst mistake"? Not a chance - there are many much worse mistakes in industrial design. Design needs to compromise between function, cost, and robustness (and aesthetics, if you don't like ugly), and the design of USB does this quite well, with a major goal (thought very important by the designers) being to keep the cost down. The success of USB, and its adoption as a widely-used standard shows how well it met its design goals.)
Further reading: Ajay Bhatt (one of the main developers of USB) on the compromises in the design: