Why, when it produces 30% more cotton than it consumes, and when the world's unused stocks of cotton are forecast to be 50% higher by the middle of 2013 than they were in 2010, has India banned cotton exports? And why is its government so desperate as to ban even cotton exports it's already approved? Mike Flanagan takes a look.

As so often, the Clothesource security director suggested the answer. There's a huge scientific debate about how our security director is motivated. Some argue that he - an entrancing English cocker spaniel called Jed - is mainly concerned with dominating us or every dog he meets, just like all other dogs. Others argue his occasional undesirable behaviour (like trying to bite my hands off) is really the result of fear. Others say it's pointless to think about motivations; he does what he does because it just happens that way. Call it incompetence or laziness if you will, but it's really pretty much the first thing that comes into Jed's head. Call it simple dogginess.

Until 5 March, when India announced an immediate ban on cotton exports, most people in the industry were discussing the reasons for the current glut in cotton and its likely consequences. In the current harvesting season, the world will produce about 3m tonnes more cotton than it is likely to use: 26.8m tonnes grown against 23.7m moving into mills.

Before 5 March, there was a serious argument prices might start falling below the current 93 cents/pound, and that farmers would start planting something else later this year - possibly leading to worldwide shortages in 2013 or 2014. Alternatively, the growing share of manmade fibres in the world fabric market might act as a brake on future cotton inflation.

But the prospect of current cotton scarcity was the last thing on almost anyone's mind.

Except for the Chinese government's. China typically uses about 50% more cotton than it grows. The rest it imports (mostly from the US and India), and its spinners and weavers were particularly hard hit by the cotton price rises of 2010/11.

In March 2011, it announced it would make substantial cotton purchases over the following year for its strategic reserve whenever cotton fell below $1.42 a pound. That decision has led to nearly 1m tonnes being bought -and the real prospect of further purchases through the rest of March 2012.

China doesn't want to see its textile and garment businesses disadvantaged again by rising cotton prices - however unlikely that looked at the beginning of this month. China, quite simply and however bizarrely in many Westerners' eyes, is frightened of the political unrest that could easily follow the unemployment that would result from falling garment exports.

Though many actions on the part of the Chinese may well be the result of some complicated and devilishly clever long-term master plan, buying all that cotton was the result of simple fear.

Moral number one: never underestimate China's fear of social disorder.

Unfortunately China's worries about unemployment ran right into the immovable object of India's worries about the stability of its manufacturing and banking sectors.

It appears that most of the strategic cotton purchases made by China over the past six months have been from India - and that India's total commitments to cotton exports over the next few months are greater than the likely surplus left over after its domestic spinners and weavers have bought what they need.

On 5 March, it revealed the problem was even worse than thought, as crop disease reduced the forecast size of this year's Indian cotton harvest further.

Now it's hard to imagine, from India's point of view, a worse time for that to happen. India's textile industry is sitting on around a trillion rupees ($20bn) of outstanding loans, and many of those debtors are struggling to keep up their payments.

The reasons for this include India's relatively high interest rates, the carnage inflicted on the profitability of textile companies by the last two years' cotton price helter-skelter, India's falling share of the worldwide garment market, and the surprising softness of its domestic garment market.

Out of 287 apparel and textile companies listed on the Bombay Stock Exchange, 122 had reported a net loss in the first quarter (April 2011 to June 2011) of India's 2011-12 financial year.

Heavily in debt even before the 2008 recession (as a result of financial finagling and serious problems with foreign exchange dealings), and often missing loan repayments, India's spinners, weavers and garment makers have been further weakened over the past three years by falling worldwide market share, unexpected declines in domestic sales and the last 18 months' vagaries in the cotton price.

Though much worse than the typical company, Gokaldas Exports - still apparently India's largest clothing exporter - in February said its losses doubled in the third quarter (October-December) of the 2011-12 financial year to INR370m ($7.7m) from INR167m ($3.5m) the previous year, as exports fell 30%. Its share price now stands at nearly 80% below the level when most were acquired by private equity company Blackstone in 2007.

Spinners and weavers in particular want outside help in managing their debts. If they don't get any, and simply fail to pay on time, there are growing worries about their creditor banks. With that volume of non-performing loans, the banks themselves risk having their credit downgraded.

The Indian government has been arguing about how to handle the problem for some time. But the one thing it absolutely does not want is for the textile companies to be even further damaged by a sudden spike in the cost of the cotton they spin and weave.

Lots of observers will argue India should have handled this differently - but none of them would have to deal with the mess that could easily result from a flurry of bankruptcies in India's textile companies.

Apart from anything else, export bans are almost always in breach of WTO rules. And many such critics would accuse India of incompetence - or if you're a believer in the Jeddian school of psychology, dogginess.

From the Indian government's point of view, the decision might not have been perfect - but to politicians seeing a real risk of major financial crisis, it was a great deal less incompetent than all the alternatives.

Moral number two: never underestimate India's fear of economic disorder.

Which produced the really weird twist to this story. On 1 March, just a couple of days before India's government banned cotton exports, its leading ratings agency, CRISIL, professed itself extraordinarily (and in my mind, incomprehensibly) optimistic about the financial prospects for India's publicly quoted garment exporters. It forecast annual sales growth of 4% in the medium term, based on the mind-boggling grounds that those companies' European and American customers "will benefit from cost economies of outsourcing to India, given its abundance of raw material and skilled labour."

What "cost economies"? There's no more garment manufacturing in Europe or the US to move offshore. Indeed the current big (though in fact highly over-rated) story is the re-shoring of Asian garment production to manufacturing locations closer to their markets.

Any growth in Indian exports has to come at the expense of Bangladesh, China, Vietnam or Indonesia - all of which offer significant cost economies over India. There are sometimes good reasons for garment manufacturing in India - but cost economies over anywhere else in Asia simply aren't among them.

India has no "abundance of raw materials". Its garment makers depend on cheaper cotton than the Chinese can get (because the process of garment making is relatively expensive in India) - but that's clearly possible only with illegal restrictions on trade.

India is seriously short, compared to China, of manmade fibre - and its energy supply is so far from being abundant that the textile industry in Tirupur believes this year's production is going to fall 30% because of power cuts.

Worst of all, CRISL's "abundance of raw materials" claim was made the day after stories broke in the Indian press that India was committed to selling China more cotton than its own spinners and weavers could spare.

We were all surprised India's government reacted the way it did - but everyone with any knowledge of the Indian textile industry knew by 1 March that the country was in danger of running out of cotton.

And as for "abundance of skilled labour," India's garment industry has been consistently complaining for the last year that rising agricultural wages are making the retention of trained staff increasingly difficult. India may have an abundance of people - but not of people able to operate specialised equipment or willing to live near garment or textile factories.

So how can anyone claim with a straight face that European and American customers "will benefit from cost economies of outsourcing to India, given its abundance of raw material and skilled labour?"

We all now know that a decade or so ago, when American ratings agencies were churning out absurdly optimistic comments on dotcom companies, the ratings were simply lies intended to boost share prices, motivated by straightforward greed. That isn't the explanation this time.

CRISL's eccentric view of the Indian garment industry comes, I suspect, from something quite different, and something our security director, Jed, would recognise immediately. The desire for praise from the people he's closest to.

In Jeddian psychology: dogginess. Endearing in a cocker spaniel - but never something you'd use as the basis for a commercial decision.

Moral number three: never underestimate the ability of a consultant to abandon common sense if that gets more mentions in the media his target customers read.

Pretty much like Jed if he sees a pheasant on the other side of a busy road.