Thieves Guilds are a trope of the Fantasy genre, they typically describe the criminal element of the setting and often reflect a perception of crime. It is a fairly well-worn trope at this point and their appearance can often induce eye-rolls from genre savvy fans. But perhaps there is more to your local Thieves Guild than ragtag guttersnipes with a penchant for pick-pocketing.
The concept itself predates what many consider the start of the Fantasy Genre, the first reference to a Guild of Thieves appearing in the Spanish short story Riconete Y Cordillo (by Miguel de Cervantes, author of Don Quixote) which feature a young man apprenticing to become a master thief as he enters a new city.
Guilds make a common appearance in Fantasy but they are often presented as similar to unions or corporations, when in reality they were more like a mix of the two with apprenticeship schemes thrown in. If you are going for an accurate portrayal of a Guild, i.e. a group that trains new apprentices, protects trade secrets, maintains monopolies, and has some amount of authority granted by the monarch/lord, then a guild of thieves would be pretty difficult to represent. Not impossible however as Terry Pratchett managed.
The Thieves Guild of Ankh-Morpork commit legalised crime, their profits are shared with the ruthless Patrician, and they make sure no one else commits crime without their consent. Pratchett’s Thieves Guild manages to be a clever commentary on crime and class, how legal loopholes are created for institutional power, and how monopolies form.
"...the [Thieves'] Guild was given an annual quota which represented a socially acceptable level of thefts, muggings and assassinations, and in return saw to it in very definite and final ways that unofficial crime was not only rapidly stamped out but knifed, garroted, dismembered and left around the city in an assortment of paper bags as well."
– Terry Pratchett, Equal Rites.
Quite often however Thieves Guilds are essentially gangsters in a swords and sorcery setting. This gets a little harder to properly define. Gangs of criminals have existed in some form or another for thousands of years, but not quite in the same capacity they exist today. Sometimes these can exist in the same fashion as the Forty Thieves from the Arabian Nights as a group with a formal hierarchy who engage in banditry. Sometimes the interpretation is more modern, in the Elder Scrolls games the Thieves Guild initially appear to operate like a modern Mafia, a formal hierarchy and a variety of illegal operations with legal ones to provide cover.
The way a Thieves Guild operates within a fantasy or historical setting can tell us a lot about that setting. If they operate more like modern organised crime with a fantasy aesthetic then it might be important to think about what has power and value in that setting, instead of smuggling weapons the Thieves Guild could be smuggling magic scrolls. If the writer is trying to portray a Thieves Guild as an actual Guild then it behoves the writer to learn how Guilds functioned, they were unlike any economic institution we have today, when writing them in this fashion a writer is forced to rethink their world’s economy and how it relates to criminality.
Whilst some might roll their eyes at the Thieves Guild trope, there is still plenty to squeeze from the concept, as not only an aesthetic flourish to fantasy criminals but also as world-building and commentary on the nature of crime within a fantastical world.