9 pirates have to divide 1000 coins... A band of 9 pirates have just finished their latest conquest - looting, killing and sinking a ship. The loot amounts to 1000 gold coins.

Arriving on a deserted island, they now have to split up the loot. You, as the captain of the band, have to propose a distribution plan (who gets what). What's your proposal?

Consider that this bunch is a democratic lot. If your proposal is accepted by half of the group, then everybody adheres to it. However, if folks feel you are getting greedy, and less than half of the band agrees to your proposal, then they kill you, and then your First Mate gets to make a proposal. And so it goes in decreasing order of hierarchy/seniority.
In order for pirates to make consistent decisions, we must start with two assumptions.  First, pirates are all completely logical, and that they are all completely logical is 'common knowledge' (see joriki's comment below).  Second, we must take a stance on the bloodthirsty vs. friendly issue (see Micah's comment above), and the problem isn't as interesting with friendly pirates, so we assume they are bloodthirsty.

Under these assumptions, it can be shown that with a loot of $G$ gold coins, and $n$ pirates, the first pirate has a proposal that will be accepted in which he receives $G-\lfloor\frac{n-1}{2}\rfloor$ gold coins (here we assume $G\ge\lfloor\frac{n-1}{2}\rfloor$).  Denoting a proposal as $(g_1,\ldots,g_n)$, where pirate $i$ receives $g_i$ coins, the first pirate should propose $(G-\lfloor\frac{n-1}{2}\rfloor,0,1,0,\ldots,\frac{1-(-1)^n}{2}).$

Immediately we note that in any proposal, exactly $\lfloor\frac{n}{2}\rfloor$ pirates receive no gold coins.

We prove that this proposal will be accepted by induction.  If $n=1$, the pirate will choose the $G$ gold coins over suicide, and if $n=2$, the first pirate will vote for his own proposal, thus obtaining a majority of the vote.

Next, suppose the said proposal is accepted for $n-1$, and assume there are $n$ pirates.  Since all pirates are completely logical, there are exactly $\lfloor\frac{n-1}{2}\rfloor$ pirates that know they will receive $0$ coins if they don't accept the proposal of the first pirate.  Since pirates are bloodthirsty, the first pirate must buy their votes with $1$ gold coin each.  This gives a proposal that passes with a majority $\lfloor\frac{n-1}{2}\rfloor+1$ votes, where the extra vote is from the first pirate himself.

In the case of $9$ pirates and $1000$ gold coins, the first pirate will receive $996$ gold coins.
The solution given in the textbooks is wrong if people have Muth Rational Expectations- i.e. they expect the prediction of the correct economic theory. If the correct economic theory is that share in the booty should be proportionate to the pirate's expected marginal product in contributing to a victorious fighting coalition then any other proposal gets voted down and its proposer is killed. The fact that pirates are rankable by ability means there is a Expected Marginal Product curve even if it is difficult to compute. Moreover expected values can be fractional, reflecting the fact that there is some non zero chance that a stronger pirate may be killed by a lucky blow from a weaker pirate.
As a matter of fact, only an irrational person or one under compulsion by an all powerful tyrant, would make the 'backward induction' offer. But if an all powerful tyrant exists then they can always devise rules such that whatever outcome they want is voted for- unless of course people are rational enough to defy such a tyrant.