Hmm...
Probably the most important thing to remember is that, realistically, there was never really any such thing (historically) as "Bushido". The term was popularised by Inazo Nitobe, a Japanese ex-pat Christian (Quaker) living in Canada, who used the framework of his Christian ideology and Western stories and concepts of chivalry (itself something created and popularised well and truly after the facts) to introduce aspects of Japanese culture and history in English, in a book he wrote in the beginning of the 20th Century, some 40 years after the caste system that the samurai headed was abolished. Nitobe was actually positive that he invented the term "Bushido", as it is not one that has historical precedent (one very obscure usage of the term has been found, but is not related to the ideas and ideals that Nitobe was putting forth).
In other words, the idea of the samurai holding to a set of 7 core values as part of their sense of identity as a warrior (bushi) is a modern fiction.
That said, codes of behaviour were not unusual, often being set by the local Daimyo (feudal lord), which may or nay not have had some cross-over with the modern popular expression, but, much like the Pirates Code, they were often more "guidelines than actual rules"...
This modern Bushido idea didn't really take off in Japan all that much, though, until the idea was co-opted by the Japanese Imperial Government heading into WWII, where it was twisted and perverted as a propaganda and promotional tool to instill a sense of Japanese superiority and military entitlement, aiming to encourage volunteers, and, later, to justify such desperate ideas as the kamikaze flying bombs. This concept of Japanese moral and military superiority, though, is more of an influence on the actions such as listed above. In a real sense, the Japanese army and officers were trained to view anyone not Japanese as barely human, a concept known as "othering" that is, even more sadly, far from unique to these events.
I'm not sure I'd reduce it to anything so simple... reality is often far more nuanced... nor would I say that this describes the samurai in the main. Some, sure... but "bands of bloodthirsty hooligans" is not really in keeping with historical accounts or records. Most samurai violence was kept rather in-house, as fights were between different samurai factions, rather than being carried out by what seems to be implied here (roving groups looking for a fight). And, depending on the time and place, there were definite consequences for engaging in what was seen to be unnecessary violence, ranging from fines to imprisonment, to death, whether by your own hand (seppuku), or execution (which was seen to be far worse).
I'd also question your take on the idea of chivalrous knights (as a concept) being a mask put on "after taking power by fear and bloodshed". Simply, once the power is taken in such a manner, the mask isn't necessary... so, no, that's not how any of it worked. In regards to the chivalric ideals, that comes down to a highly placed Lady, who acted as a patron of a number of bards, employed them to create songs and tales of heroism and fidelity (to the church, their wives, and their country). This would be taken up by the Roman Catholic Church by the mid 12th to 13th Century, but was little more than an attempt to curtail some of the more outlandish actions of knights in the Crusades and after. The modern take on it started during the Renaissance, where the new Age of Enlightenment sought to cast history in a more positive light, heavily influenced by works such as Le Morte d'Arthur, written by Thomas Mallory around 1460, and really formed in Victorian England, with a renewed interest in such stories again.
The reality (for supposed Chivalric Knights and for samurai) was largely the same... the social hierarchy positioned nobles and royalty on top (nobles acting originally as a support network for the royalty, often starting as close servant-families, which included organisation of military forces). In other words, they were already in power, with no real need to "seize" anything, other than jostling amongst themselves for prominence. There's no need for a mask to be put on after power is achieved, as the main threat isn't the peasants rising up, it's the other nobles... and you don't want to demonstrate weakness to them. More than anything, it's a filter that later generations applied to justify (as much as anything to themselves) why these nobles were supposed to be at the top.
As far as the yakuza, that's not a trick. It's PR. And nothing like the ideas of Bushido or Chivalric traditions, as the acts of charity by yakuza groups is happening in real time, not an invention centuries later.
"Well rid of the samurai"? As with most social and cultural groups, there were good and bad points to the samurai, but "well rid of them"? Considering the samurai existed as a social class for some 800+ years, longer than most modern countries have existed, I don't know that I'd generalise or dismiss them with any real ease... as for the book (Hagakure), it's an intriguing one... but not one that should be seen as representative of the samurai themselves, not even of the samurai of the time and place of Yamamoto himself.
Hagakure was considered highly controversial even in it's own time, with copies smuggled between small groups of adherents, and punishments meted out to those found with a copy. It was a compilation of recollections and stories from Yamamoto Tsunetomo, recounted to Tashiro Tsuramoto, largely extolling Yamamoto's perceptions and beliefs regarding the proper behaviour of a loyal retainer, highlighted by stories of previous generation samurai and lords of the Nabeshima domain. Thing is, Yamamoto himself was what we might call today a rather right-wing personality... not quite an extremist, or even what I would class as a radical, but certainly an outlier in his feelings. He was also, unfortunately for him, of a later generation of samurai, having been born after the country entered into the period of stabilised peace known as the Tokugawa era, and, as such, never had the opportunity to fulfill his own ideal of dying for his lord (he wanted to commit suicide when his own lord died, but was forbidden, so retired to a life as a Buddhist monk, where Tashiro came to him). As a result, much of the concepts and ideas put forth are somewhat romanticised, with a great emphasis on commitment to an ideal, a preference for action over consideration (he notably criticises the 47 Ronin of the Chushingura story surrounding the Ako Incident for delaying their vengeance, something that again puts him out of step with most samurai thinking), and a dedication that can only be fully realised in death. These thinkings were considered rather less-than-ideal to be out there influencing samurai, who would then think it best to rush into situations where they would die, give rather short-term thinking to situations, and lead to a loss of many good retainers, so it was, in effect, banned.
It came back to some prominence in the early 20th Century, after Nitobe's book began to give some kind of resurgence to the ideas of the samurai (the fledgling Nippon Butokukai, which would form the basis of modern Kendo and the current Nihon Budokan organisation, was coming into existence, Kano Jigoro was getting his judo, developed from older samurai jujutsu systems, into the education system, and Japan was starting to look outside it's own borders for the first time in nearly 300 years), and Yamamoto's teachings were rediscovered. The first public printings of the book were in the year 1900, just before Nitobe's book, but as interest in the samurai began to increase. What it never was, though, was a highly influential book for samurai, as it was only in one domain, and, even there, largely banned. Nor was it a handbook for all samurai to adhere to... indeed, it breaks with conventional samurai thinking a number of times over the course of it's entries. It is an interesting book to gain some insight into what one person, removed by time and circumstance from the very thing he is discussing and idealising over, thought... but shouldn't really be considered much beyond that.
Now, obviously, this isn't to say it's without it's value, or that you can't get inspiration or be drawn to think about it's concepts from reading it. But it's not discussing Bushido, as that largely modern idea wouldn't form for another 200 years (in another country!), nor is it anything close to definitive regarding samurai thought or behaviour.