Years ago, as I recall, ratings agencies derived income via subscriptions from investors seeking financial and rating information on publicly traded companies. At some point, this structure changed, and the rating agencies began to receive income from issuers, often brokerage firms. This created a potential conflict of interest since the issuer could choose to do business with the agency that rendered the most favorable rating.
As we witnessed during the financial crisis, brokerage firms packaged multiple tranches of mortgage-backed securities into one security, with each tranche having a varying degree of credit quality. For example, one tranche might have been high quality and the rest was junk status. In order to obtain the business, the rating agencies rated it as "investment grade." This was a well-documented practice during this period. Many unsuspecting brokers sold these toxic securities to clients as high quality.
A similar situation pertains to individual stocks. A stock analyst working with a large brokerage firm rates various stocks as a buy, hold, sell, etc. If the analyst doesn't give the stock a good rating, the issuing company may not allow access to the analyst the next time.
Brokers working for a large, publicly traded brokerage firm are under pressure to produce revenue, which helps to boost the price of their company's stock. Because of this pressure, many brokers are forced to spend their time selling, leaving the research (i.e., due diligence on investments) to their company. Can the broker trust his company's research? A company might push certain bonds because it has a lot of it in inventory or recommend a particular stock, not because it is such a great stock, but for "other" reasons.