While there's a lot of truth behind what you say, I'd also be willing to say your romanticizing quite a bit. Yes, it's still a huge problem and there is a huge yakuza presence in Japan, it's not quite to the extent that you (and crazy movies) would lead us to believe. Additionally, they served some positive roles, especially in post-war reconstruction. Many yakuza have/had semi-legitimate businesses on the side, often construction or demolition. They helped stimulate the economy with this sort of work after the war. Additionally, they provided a means for the Burakumin, the outcasts of Japan, to enjoy a decent lifestyle. Though discrimination was officially done away with after the Meiji restoration, a lot of that prejudice still remained - many yakuza could have cared less about the type of person as long as they got a productive member for the group.

Some fun facts about yakuza:

The word “yakuza” is said have come from a Japanese card game similar to blackjack, where a hand of eight-nine-three (pronounced ya-ku-za in Japanese) was a losing hand, and the term is not supposed to mean “good for nothing.” It can be further traced back to the Japanese word “boryokodan” meaning “violent gang.”

The yakuza roots date back to 16th century Japan where unemployed samurai would turn to this less-than-honorable (at the time) profession for means of employment. During the 19th century these gangs began to become more organized and bureaucratic and they split off into many different factions and groups.

Hope that helps fill your heads with yakuza visions.