Verizon is doing their due diligence and whatever transpires in public is done to negotiate the purchase price lower or to eliminate liabilities later down the road.
Management is responsible for every aspect of how an organization functions and operates. When management fails this comprehensively, it's not unusual for the organization to fail in multiple different ways.
But Yahoo has been on this trajectory since long before Mayer joined them. They are to internet services what Blackberry was to mobile devices. They were a transitional platform, just advanced enough from the old platforms (CompuServe, AOL) to succeed when they failed, but too like them to succeed once the industry transitioned to the new paradigm.
The threat of impending or active litigation will make Verizon reluctant to close a deal with Yahoo. It's new downside risk for Verizon that they have no desire to take on. Verizon may ask that Yahoo settle the lawsuit before closing the sale.
So, it may be that the lawsuit was timed to put maximum pressure on Yahoo to settle, by creating risk of jeopardizing their sale.