Lawyers do add productivity, which is why they get paid so much when they work for corporations. I don't have a horse in that race, because I don't work for corporations. I make law reform recommendations, which is one way to add value by creating predictability in the legal system.
The lawyer tells the company what its risks are, and importantly in this context, how to approach and structure a transaction so that the result is predictable and that all parties know what the rules will be given the likely set of results.
This isn't that important if you're just loaning your lawnmower to the neighbor. But pretending that two massive corporations can negotiate, say, a contract to supply materials for manufacturing by just sitting down and "honoring the contract" is absurd. Both will have a litany of expert terms that everyone needs to be sure mean the same thing, both will want any number of assurances and guarantees that address completely different needs, and both will have very different ideas about what is "fair" for one side or the other to pay should things go wrong.
That's where the lawyers come in - they sit the parties down and make sure that everyone actually understands what the agreement is, so that they can go back to their clients and tell them exactly what they're in for. It's an expert service like any other; the bosses say what they want, the lawyer translates that into results in the agreement. No different from "I want this machine to make widgets" to an engineer, who makes a machine for widgets on those instructions.