A CEO's purpose is to organize and direct a company to meet its corporate charter.
Good read on the shortcomings of the "agency theory" based view that you're assuming, and which thankfully is finally becoming less of the de facto view: https://hbr.org/2017/05/the-error-at-the-heart-of-corporate-...