I've come to the conclusion that it is merely a fiction that firms exist to make their shareholders rich.
"The purpose of a system is what it does" (Stafford Beer). The people who decide what a firm does are its directors. Ergo, the purpose of a firm is to make its *directors* rich.
This is a special case of a more general problem. Any economic system requires a class of skilled resource allocators. So, how do you stop them allocating the resources to themselves?