Most crime is the product of desperation and hardship. Most organised crime is the product of systemic discrimination against a specific group that then organises itself as a form of self-defence; that group then turns its tight-knit collective spirit to crime because they are somehow prohibited from acting overtly.
So it is with the Yakuza, kind of. They originate with many discriminated-against groups in pre-modern Japan, such as peddlars and tinkers, gamblers, foreign nationals and burakumin, but to say they don't operate overtly is not true. Yakuza are unlike most organised crime groups in the way they exist as official organisations with legal status at the same time as they conduct covert criminal activities. They are very proud of their origins as mutual assistance societies and refer to themselves as 任侠団体, ninkyō dantai - "chivalrous organizations". This is actually true to some extent - traditionally part of the draw of the Yakuza life is how they provide an accepting group for all sorts of outcast people, and in some situations they provide aid to the wider society, for example in the aftermath of the 1995 Kobe Earthquake, the national government was for whatever reason unable to quickly provide aid for victims, so the Yamaguchi-gumi stepped in and provided food and shelter much faster and more efficiently than the government was able to, up to and including the use of a helicopter.
Essentially, it's important when thinking of Yakuza, or really any other organised crime group, to remember that they exist for a reason that's more complex than 'they are criminals'. Yakuza like to look at themselves primarily as a family-like organisation that exists to help its members, and while they can be very violent, they don't tend to be quite as physically brutal to those outside their world as many other organised crime groups, preferring to lean towards more white-collar sorts of crime like protection, extortion, loansharking, gambling, the sex trade and so on. More cutthroat crime like the drug trade, backbone of most modern organised crime in the majority of the world, is something they've both avoided and actively sought to suppress historically.
The Yakuza organisations like the Inayoshi-kai, Hirabayashi-gumi and others featured in the Deliverance stories are complicated in their structure, much like real Yakuza organisations. A key element of this is the hierarchy. Here's how it works, top to bottom, with examples from the Inayoshi-kai, mostly featured in Book 3:
Kumicho - Organisation boss (Shiori Yamashita)
Saikokanbu - advisory group reporting to the Kumicho
Wakagashira - first lieutenant, second only to the Kumicho; unique position (Toshi)
Saikokomon - chief administrator; unique position (Nobuo)
Sohonbucho - HQ chief; logistics, facility management, etc. ; unique position (Aki)
Fukuhonbucho - assistant to Wakagashira; unique position (this position is not currently occupied as Toshi is a very hands-on guy)
Komon - advisor, usually senior Shateigashira; may be several of these (Kawakami, Mutsuo and many others)
Shateigashira - bosses of specific local gangs (Saburo)
Shingi-in - legal advisor (may work within or separately from regular gang structures) (This was Hanzawa's day job)
Kaikei - accountant (may work within or separately from regular gang structures) (Nobuo's staff)
Wakashu - individual foot-soldiers (Most of the Yokkaichi crew)
Prospective members, for example bosozoku or chinpira; they may be used for muscle (The bikers from the first book)
This is somewhat parallel to the structure of government (merely a funny co-incidence, I'm sure). The Kumicho is like the Prime Minister, the Saikokanbu is like the cabinet, Shateigashira are like constituency MPs and Wakashu are like grassroots party members. The Wakagashira is like a combination of chief whip and Deputy PM, immediate successor to the boss but also the one who makes things the boss decides actually get done.
The Saikokomon heads the administration of the organisation, and how this works varies from one organisation to the next. There are many more traditional groups which separate admin from the ordinary business of the organisation, and here the Saikokomon is responsible for the accountants and lawyers directly and separately from the regular gang members. However more progressive organisations tend to integrate these elements into their daily activities more, so there may be very little or no separation of admin from regular activities, more like a modern company.
The Fukuhonbucho is a very flexible position and in many organisation this person is primarily a fixer, while other organisations use the position as a sort of head Shateigashira to let the Wakagashira concentrate on administrating the overall organisation rather than dealing with specific details of their own group. Some organisations forego this position entirely, as in the case of the Inayoshi-kai.
An extra position exists within the organisation: the Kuromaku. This person is a fixer, operating secretly to deal with and solve a wide selection of problems and trusted at the highest level; basically the Yakuza equivalent of a spy or perhaps undercover agent. Yohji is the current Inayoshi-kai Kuromaku.
In the case of the Inayoshi-kai, a further level of Kumicho and Saikokanbu exist above the Kumicho of individual organisations; technically speaking Yamashita is not just a Kumicho but a Kaicho, a rarely-used title. In the world of Deliverance, Yakuza organisation suffixes have more specific meaning than reality.
-gumi is the suffix used by most Yakuza organisations, either openly in the case of traditionalist clans or groups, or used with a private name not known in public by organisations preferring a more modern, less inflammatory public name. For example the true name of the Akita Mutual Business Society, who dispatched their man Kouta in a Jeep down National Route Seven, is the Kusanoyama-gumi, but this name is known only to members and rivals within the Yakuza world, and organised crime police, who may struggle to connect it with someone specific.
-kai is a rarer suffix denoting a more overarching, syndicate-type organisation, and has historically been used more for alliances and factions, until the Yamashitas rose to the top of the Inayoshi-gumi and began building outward, knitting the organisations they met and dealt with into an overall syndicate, the Inayoshi-kai. The Inayoshi-gumi is the original Yakuza organisation based in Yokohama since the early 20th centuy, with operations across Kanto, but is merely the original centre of the wider Inayoshi-kai, which is a syndicate or perhaps umbrella corporation. The Inayoshi-gumi are preeminent among the clans, families and organisations within the syndicate, but are not the majority. A good parallel is a very large, horizontally diversified conglomerate company like Sony, known as a keiretsu. Sony is primarily known for consumer electronics, and that's where the company's origins lie, but in addition to that they also have insurance, banking, telecoms, clinics and pharmaceuticals, movie studios, not to mention foreign subsidiaries that do all these things in other countries, and these different arms vary massively in what they do and how they do it...but all of it is Sony.
-rengo, on the other hand, is an old-fashioned word from the earliest groups of Yakuza, and so Shigeko has cleverly reclaimed it for use in attempting to form their own syndicate of traditionalist organisations.
The organisation described above is complex enough, but there is also the matter of seniority. Those who know Japan a little may have encountered the sempai/kohai dynamic - essentially senior/junior, but with really wide ranging implications, for example who defers to whom in otherwise equal situations. For Yakuza, there is Oyabun/Kobun, a similar system of seniority that governs induction of individuals into organisations; the words translate roughly to 'parent role/child role'. Any full member can act as an Oyabun and take on a Kobun, effectively mentoring them and inducting them into their organisations ways. This persists at all levels, and is often generational, creating groups of Oyabun and Kobun which broadly are known as Kyodai and Shatei - big and little brothers, respectively. Any given individual can be all of these at once for different people, providing a second dynamic operating parallel to rank which makes understanding the relationships of members extra confusing.
While much of the above is true to the best of my knowledge, the Yakuza depicted here are different from real Yakuza, for several reasons. First and foremost I don't want to get thrown off a roof like Itami Juzo was (this may be a delusion of grandeur, but that's a form of grandeur I don't wish to risk), so I want to keep a healthy distance from anything recognisably real, which is also why all the factions are not real ones. Another reason is that it's really hard to get this sort of thing actually reliably right without first-hand insight, which as a foreigner I just don't have, or indeed really want.
Another is that in reality, from what I've heard the Yakuza are kind of fading into history. Life is getting harder for them, and the social forces that created the sort of outcasts they gave a home to and relied upon for recruitment are to some extent disappearing, making it very difficult for them. Discrimination against burakumin, Koreans and Chinese, the majority demographics of Yakuza, is less serious than it was (but not gone, by any means!) and 6nowadays people from these groups usually have chances to make their way in civil society without resorting to a criminal career. Coupled with newer Yakuza Exclusion Ordnance laws that make membership of Yakuza groups a serious handicap in society, not only are people not joining, but they are actively leaving.
These anti-Yakuza laws are a major difference; in the world of Deliverance, it can be assumed no such laws exist, or if they do, they are not fit for purpose and easily circumvented. A good way to understand the way Yakuza work in Deliverance stories is to imagine that the Rotary organisation were also actual gangsters - doing business favours and oiling the cogs of society by day, loan sharking and operating gambling dens by night. This blending of the legitimate business world and the underworld, essentially, was always Yamashita and her husband's long-term goal, and they are much more forward-looking and successful than real-world Yakuza syndicates...so far as we know.
Personally, I'm not completely sure. Look at the case of Carlos Ghosn and the way he was, in my opinion, pretty much entirely framed, and pretty competently so, by elements of the Nissan corporation loyal to other members of the board of directors. I'm sure Nissan employs many talented people, but for experts in corporate and financial crime I theorise that they may well have hired the help of outside 'specialists'. And look at the 'mismanagement scandals' occurring with suspicious frequency at Olympus, at Toshiba, at Takata and so on... It all suggests to me that the larger corporations have at least begun to realise that they are more than capable of conducting a level of criminality arguably an order of magnitude higher than the Yakuza ever did, and they are so important to the national economy that there's actually very little anyone can do about it. The lack of any sort of consequences for virtually anyone in any of these scandals also suggests that police are not able to investigate this sort of behaviour, and/or the judicial system are unable to prosecute it. It strikes me that someone with both business acumen and criminal competence would be incredibly successful in this sort of environment; are former Yakuza who can hack it in business simply eclipsing the organisations they used to belong to? What do you think? Has Japan Inc. become the new evolution of organised crime in Japan? Or maybe I'm just reading way too much into this stuff, drinking too much caffeine and getting a bit over-excited?
Oh, and the other thing: sexism. Exceptions have existed at various times, but as a rule Yakuza are guys, and their wives and women are mostly on the level of accessories or staff rather than actual members; a major part of real Yakuza business is the sex trade so women are also seen as essentially merchandise to some members. Naturally this situation, along with Japan's startlingly patriarchal society, tends to breed misogyny. Female members of existing Yakuza families are another thing, but they are still not usually seen as significant in organisational terms compared to male members of their families. Female kumicho are not absolutely unknown, but are certainly not common, and two highly prominent ones vying for supremacy is very unlikely in the real world.