David Weil, a Brandeis University professor and labor market expert, knew that Uber and Lyft had long used algorithms to match the supply of drivers to demand from riders, and set prices accordingly.