Charles Schwab lost a big court decision last week in a case that has significance for investors in mutual funds. A federal judge ruled that Schwab violated the law when its YieldPlus ultra-short bond fund failed to get shareholder approval before loading up on mortgage-backed securities. When the market for those securities collapsed, the fund lost 36% — a nasty surprise for investors who believed that YieldPlus was a safe alternative to cash. Left to decide is the amount of damages the investors should receive; lawyers say California investors alone lost about $170 million, the rest about $800 million. I myself looked into YieldPlus while reporting a recent story for MONEY about Charles Schwab. Most observers I talked to believed that the fund’s losses represented an isolated mistake — a big, bad mistake to be sure — rather than evidence of a corrupted corporate culture. But the YieldPlus debacle did strike me as a particularly problematic episode for Schwab, which built a wildly successful discount brokerage based on the philosophy of not telling its investors what to buy. As the company delves deeper into helping its customers design their portfolios and invest smartly for retirement, it becomes ever more challenging for Schwab to provide advice that’s free of conflict. Once a firm creates its own mutual funds, such as YieldPlus, an obvious question is raised about the incentives employees have to sell those funds instead of others. Let’s review the arguments of this surprisingly underpublicized case: During the 2000s, according to the complaint at the center of the recent case, Schwab marketed YieldPlus as offering “good returns with low principal risk,” listing the fund as an option for investors’ cash allocation in their portfolios. Yet, the plaintiffs claim, YieldPlus loaded up on mortgage-backed securities that were much riskier than its marketing materials conveyed, allocating as much as half of its assets to MBSs in early 2008. The complaint further alleges that Schwab trained its customer representatives to recommend customers transfer assets to YieldPlus from money market funds, and that Schwab’s compensation structure made it financially beneficial for them to do so. (The company’s compensation system paid more for assets held in mutual funds than in CDs, for example.) Schwab, in court documents, denies that it took on more risk than allowed and denies that it misrepresented anything to investors. The company also rejects the allegation that it trained reps to upsell customers into the fund and had any incentive to do so. For the company itself, YieldPlus brought in roughly $76 million in fees for the four years leading up to the collapse. In any case, Schwab customers piled into YieldPlus, pushing its assets past $13 billion in 2007 — just in time to see the fund tank, along with the MBS market, in 2007 and 2008. A key allegation in the lawsuit is that YieldPlus’s big bet on the MBS market violated a policy preventing it from investing 25% or more of its assets “in an industry or group of industries” unless shareholders voted to allow it. That’s led the parties in the case to argue over such issues as the definition of a “single industry,” Schwab’s obligations to notify investors, and the necessity of getting shareholder approval for the change in policy. But in a decision issued last week, U.S. District Judge William Alsup sided with investors against Schwab, ruling that the fund’s MBS investments represented a reversal of the fund’s diversification policy that needed a shareholder vote for approval. “This is not a disclosure question,” the judge wrote. “It is a governance question.” Alsup also ruled April 8 against certain trustees of YieldPlus and YieldPlus’ former manager, Kim Daifotis, who had attempted to get various counts against them thrown out. Whatever Schwab’s culpability, says Morningstar’s managing director Don Phillips, there’s no question that YieldPlus is a “big, ugly black eye” on Schwab’s image of a good citizen — one that looks out for investors and not its own pockets. “People,” he says, “expect more of Schwab.” No less a sage than Vanguard founder Jack Bogle called me this week to talk about the ruling, calling YieldPlus a classic example of a firm “reaching for yield” to produce results that help it sell the fund. It’s one of the classic sins of mutual fund companies he battles against. “The message over and over again,” he says, “is, ‘Go the straight and narrow.’” To me, the lesson is that there are pitfalls to Schwab’s decade-long effort to become more than a simple hub for transactions. When you recommend an investment, sometimes you’re wrong, besmirching both your regulatory record and your image. John Kador, who wrote a mostly-glowing book about Charles Schwab and who now blogs about apologies, says he thinks Schwab erred in not apologizing to customers quickly and taking responsibility for their losses. But, he says, Schwab is trying to do the right thing in figuring out how to provide the most conflict-free advice possible to its customers. Keep this in mind, though: Just because advice is unbiased doesn’t mean it’s good. Follow MONEY on Twitter at http://twitter.com/money.