That was the reason for the zeroth law. In the books the robots subtly guided humanity in such a way as to ensure the greater good. This is the Foundation series of books which were later merged to work with the robot series of books.
Worked rather elegantly in sci-fi. Real world perhaps not.