Every company makes mistakes from time to time. Unfortunately, that's part of life. However, some mistakes are so large, or their number so vast, that it spells the end for a company. Although J.C. Penney (JCPN.Q) is beginning to show signs of improvement, its future is still very much in doubt as it struggles to come back from a series of errors it's made over the past several years.

To ensure that we do not forget the past, I detailed some of the biggest mistakes that J.C. Penney has made over the years that have helped place it in this challenging environment.

Talk about selling at the wrong time!
First up, we have some of the asset divestitures that J.C. Penney has engaged in over the past few years. In an effort to work on its core business, the company decided, beginning in 2001, to sell off some of its side businesses. This (following more than four decades of strong growth and a plethora of acquisitions) consisted of the company ridding itself of many operations it had purchased throughout the 1980's and 1990's.

The first significant divestiture made by J.C. Penney was to Aegon, a Dutch insurance company, in which it sold its direct-marketing insurance unit for $1.3 billion. As part of the transaction, the company entered into a 15-year contract with Aegon in which it would help market its financial services.

In addition to offloading these assets, the company elected to sell, in 2004, its consolidated pharmacy business Eckerd Corporation. As part of the deal, the company would sell over 1,200 of its 2,800 locations to CVS Caremark, with the remainder going to Canadian-based Jean Coutu. The transaction, which gave J.C. Penney's prior stake in the company a value of $4.52 billion, came at a cost, though.

In addition to investing money to grow its pharmacy business over several years, the company had to initially pay $3.3 billion for Eckerd while also assuming $1 billion in debt. Due to its sale, the company ultimately booked a $1.3 billion impairment on its financial statements. The deal also materially affected J.C. Penney's revenue, of which Eckerd comprised 45%.

A few years later, in 2007, Rite Aid (RAD -51.21%) ended up acquiring the remaining 1,856 Eckerd locations from Jean Coutu in a deal worth $3.4 billion. As a result of the deal, Rite Aid was able to increase its store count by 55.7% from 3,333 to 5,189 locations. Aside from an increased footprint, Rite Aid believed that it would see increased sales per store as it boasted 35% higher front-end store sales per location than Eckerd had.

A turnaround taking the wrong turn!
In addition to making questionable asset divestitures, J.C. Penney made an even larger mistake a few years later. After years of lackluster results, the board of directors decided to remove CEO Mike Ullman and replace him with Ron Johnson, a former executive at Apple, with the hope that he could turn the company around.

However, within the first 17-months of Johnson's tenure sales dropped from over $17 billion to just shy of $13 billion per year. In all fairness, some portion of this decline was likely due to a shift away from brick-and-mortar retail. That said, it's likely that a vast majority of the decline was caused by the company's decision to get rid of its traditional sales and promote "Every Day" low prices. This turned away consumers who felt that the value proposition that the sales offered had disappeared, which effectively disenfranchised them.

In an effort to reverse the company's catastrophic course, Johnson was ousted from the company and Ullman was put back at the helm. Though initial signs appear to be providing investors with hope of a turnaround, the company has had to engage in significant restructuring-oriented transactions that have brought into question the company's long-term viability.

Martha, Martha, Martha!
She's the queen of home decor; there's no doubt about that. However, even the great Martha Stewart can ruin a party on occasion. In an effort to turn its enterprise around, J.C. Penney entered into a contract with Martha Stewart Living Omnimedia (MSO.DL), Stewart's flagship company. As part of the contract, J.C. Penney agreed to invest $38.5 million in Martha Stewart in exchange for a 17% stake in the company. The deal also gave Martha Stewart the right to set up Martha Stewart stores inside of J.C. Penney locations in what the company called a "store-within-a-store" business model.

However, the deal fell through following a lawsuit initiated by Macy's, which alleged that Martha Stewart engaged in a breach of contract with it since a previous contract between the two spelled out that only Macy's would have the right to sell products that were part of the Martha Stewart Collection.

In an effort to avoid further legal ramifications and possible consumer backlash, J.C. Penney and Martha Stewart revised their agreement to permit the former the right to return the latter's shares in exchange for its cash back, as well as to change the nature of the relationship such that it won't involve selling Martha Stewart Collection products but, rather, products designed by the company that don't fit within that exclusive category.

Foolish takeaway
As you can see, J.C. Penney has made a few mistakes over the past several years that are hard to ignore. However, this doesn't mean that the company is a horrible investment today. Instead, it may just signify that management has learned from its transgressions and that, in the future, it may operate in such a way that mistakes are mitigated.

On the other hand, it's entirely possible that such mistakes may continue to impact the company. At this stage in the game, I doubt that it would have to make many more before it wouldn't be able to stand back up again.