While the massive data breach at Uber Technologies Inc. didn’t happen under the watch of its new chief executive, more than two months elapsed before he notified affected customers and drivers of the incident, people familiar with the matter said.

CEO Dara Khosrowshahi learned of the breach, which Uber said happened in October 2016 and affected some 57 million accounts, about two weeks after he officially took the helm on Sept. 5, one of the people said. Mr. Khosrowshahi said he immediately ordered an investigation, which...