A shareholders' agreement is a private contract between the shareholders of a company pertaining to different elements of how the company should be operated as well as individual shareholders' rights and obligations and different share class' rights.
They are voluntary, i.e. not every company has one, and are ancillary to the articles of association. They also outrank Articles of Association where there is a superiority clause. The main advantage to this is that the agreements are private, where a company's articles are made public. This means that shareholders can withhold sensitive information regarding the company's internal running from the public without running into major legal issues.
If you were doing an M&A based case study and there was discussion of a Shareholders' Agreement, it would be imperative to obtain this in the DD process in case it varied any of the information which is freely available as this could change a potential buyer or seller's legal position.
My entire bookmarks section is pretty much filled with your comments 😂