No, the dark web was not accidentally created.

Onion Routing, the concept behind the dark web, was developed by the U.S. Naval Research Lab for anonymous communications.

To aid in preventing unwanted network traffic analysis on DoD communications, developed the TOR application network that provides private, untraceable connections through a public network. Its single infrastructure and protocol supports anonymous traffic analysis resistant activities such as: multilevel secure communications over one network; intelligence gathering from open source; and communications using networks partially controlled by temporary allies/known hostiles.

Center for High Assurance Computer Systems https://www.nrl.navy.mil/itd/chacs/accomplishments