How legal structure influences long-term financial stability