If I understood the history correctly, being a "shareholder" was a path to a fractional business ownership for people who could not afford to outright own a business.
It comes from the same mental position as a co-operative.
In these scenarios, a CEO is really just an employee of sorts for the shareholders.
It's quite funny that we see the CEO of a publicly traded company has worse than a sole-proprietor, when profits will go directly to a sole proprietor- but not to a shareholder CEO.
I understand how it has played out, that the largest companies on earth are publicly traded now, and that CEO compensation in those companies is crazy. But it's quite ironic in my opinion how it played out.