Here's something to get a little bit eggs-cited about: Cal-Maine Foods (CALM -1.89%) agreed to settle a class action price-fixing lawsuit for about $28 million. The country's largest fresh egg producer clucks that it did nothing wrong, but rather that it has agreed to put the matter behind it in the interests of its shareholders.

Under the apparent guise of giving their chickens better living conditions, Cal-Maine and other egg producers represented by the United Egg Producers trade group -- which accounts for approximately 95% of all the egg-laying hens in the U.S. -- allegedly hatched the idea to raise prices by killing off their flocks and limiting the supply of eggs. The supposed scheme succeeded by inflating prices by as much as 40% in 2008.

But the chickens came home to roost for the cartel when food service giant Sodexo squawked that the producers were a bunch of bad eggs. Having bought some $250 million worth of eggs from them over an eight-year period between 2002 to 2010, Sodexo weighed in with a lawsuit in 2011, followed later that year by other consumer goods companies, including Kraft, General Mills, and Kellogg, which also had their feathers ruffled by the higher prices.

They contended that not only did the egg producers kill off their flocks and not replace the layers with new ones as quickly as they otherwise might, they were so cock-sure of themselves that if a producer tried to fly the coop they'd dissuade retailers like Wal-Mart and Albertsons from buying from them by withholding the UEP's certification stamp, which is viewed as a stamp of quality. 

For its part, Cal-Maine says those who ended up suing are giving a cock-and-bull story, as they were well aware and supportive of the industrywide animal welfare guidelines it was following. Moreover, it claims that the Agricultural Department was aware of the strategy it was pursuing as well.

The problem is that the number of commercial-size egg producers -- those with flocks of 75,000 or more hens -- has shrunk from 2,500 companies in 1987 to a little more than 200 by the time the complaint was filed. The price-fixing scheme also followed on the heels of the collapse of the Atkins Diet and other low-carb fads that saw egg producers profiting from the high-protein binge. Cal-Maine's stock went from less than $2 a share in the early part of the last decade to more than $20 a stub by the end of 2003 before giving investors a big goose egg when its stock fell back to around the $6 level.

Yet unlike Humpty Dumpty, the egg producer was able to put itself back together again, supposedly through the higher prices engendered by the alleged price-fixing scheme, and today Cal-Maine rules the roost and trades north of $50 a share.

Such blatant attempts to control the market might be rarer than hen's teeth, but the settlement, which at $28 million isn't chicken feed, serves as a reminder to investors not to put all their eggs in one basket.