Inevitably, in large metropolis, you'll have things like red-light districts. These places will be full of people who don't particularly value the rule of law, which means they're going to be hotbed of instability. Policemen have little incentive to risk their neck for prostitutes and various scumbags. In comes the yakuza, and order is guaranteed; nobody will make trouble, and if they do, yakuza will dispatch of them quickly and reliably. Police are happy, less work for them. They also provide easy cash, something hard to come by in a very conservative society where banks often lend money depending on your surname rather than your cashflow. They like finance as much as anybody else.
In a society that (in most cases) still values tradition and stability above everything else, yakuza provides these elements to the inevitable "dark underbelly"; as long as they cover that role, rulers are not particularly interested in going after them for a bit of unpaid taxes. Nowadays it's fashionable for mainstream media to bash them because they all need scapegoats for a long-running financial crisis that has no clear culprit (apart from the usual "generalized greed" and "implicit flaws in the capitalist model", but nobody wants to really address those two, of course).