Fans tag the content, but then — volunteers consolidate and aggregate those tags:
On AO3, users can put in whatever tags they want. (Autocomplete is there to help, but they don’t have to use it.) Then behind the scenes, human volunteers look up any new tags that no one else has used before and match them with any applicable existing tags, a process known as tag wrangling. Wrangling means that you don’t need to know whether the most popular tag for your new fanfic featuring Sherlock Holmes and John Watson is Johnlock or Sherwatson or John/Sherlock or Sherlock/John or Holmes/Watson or anything else. And you definitely don’t need to tag your fic with all of them just in case. Instead, you pick whichever one you like, the tag wranglers do their work behind the scenes, and readers looking for any of these synonyms will still be able to find you.