Tor Books' senior editor Patrick Nielsen Hayden takes to the comments of John Scalzi's Whatever to explain why ebooks are often not available at all places in the world at the same time. It's a combination of the way that publishers feel about e-rights (publishers who acquire print rights almost always demand e-rights, too), the fact that writers and their agents sometimes feel that they can make more money by selling to different publishers in different regions, and the fact that ebook retailers have a hard time keeping things straight when it comes to who has the right to sell where, and generally default to the "safe" choice of not selling at all when there's any doubt.
John and his agent could have sold us the “World English” package of rights, which would entitle us to publish the book in English everywhere–we would certainly have been willing to offer for that–but instead they opted to take the slightly riskier path of selling us rights only in our core market, reserving the “UK-and-a-bunch-of-Commonwealth-and-former-Commonwealth-countries” package to themselves, in order to try to sell it separately to a British publisher. (This is a slightly riskier path for most genre writers who aren’t top-level New York Times bestsellers, because British publishers don’t really buy very much SF and fantasy from the US below that sales level. This wasn’t always the case but it certainly is now.) After a period during which I imagine John’s agent shopped the book around to various British publishers (I don’t know the details because it’s, literally, not my business), they accepted an offer from Gollancz. However, that deal was concluded just a month or two ago, so it was vanishingly unlikely that Gollancz was going to get their edition out simultaneously with ours. I believe their edition is scheduled for November...
The more interesting question you ask is: Why can you, in South Africa, buy a copy of the US REDSHIRTS hardcover from (for instance) bn.com in the US, but you can’t buy the US e-book edition? Why do online retailers pay attention to your address and credit card when assessing your eligibility to buy an e-book, while being willing to ship any edition of any print book anywhere?
The answer is a little arcane, but bear with me. The fact of the matter is that, when it comes to traditional printed books, neither the retail booksellers nor their customers (that’s you) are party to the contracts between John and his various publishers. Our contract with John says that _we_ won’t sell our editions of his book outside the territories in which John grants us exclusive and non-exclusive rights. Gollancz’s contract with John says that _they_ won’t sell their editions of his book outside the territories in which John grants them exclusive and non-exclusive rights. But if Amazon buys a bunch of copies in the US and someone in South Africa says “Hi, here’s my credit card, send me one,” no contractual agreement has been violated. Amazon owns those books, not us. They can do what they want with them, including selling them to people in South Africa, Shropshire, or the moons of Jupiter. Amazon is not John Scalzi, Tor, or Gollancz. You are not John Scalzi, Tor, or Gollancz.
One small quibble with Patrick's otherwise excellent explanation: there are, in fact, some international restrictions on what's called "parallel importation" or "grey market selling," where a retailer imports goods intended for sale in country X and offers them for sale in country Y. Recent trade treaties (especially ACTA and TPP) have attempted to strengthen these restrictions, and an apocalyptically stupid Ninth Circuit Court of Appeals Decision has further eroded this practice.
The entertainment industry's representatives deliberately blur the lines between counterfeiting, infringement and parallel importation. When you hear that ACTA is a treaty intended to fight "counterfeiting," you probably don't think that the "counterfeit" jewelry, DVDs, books, and perfume under discussion is the actual, bona fide item, manufactured for sale in poor countries and imported without permission to a rich country. Most of us understand that a "counterfeit Omega watch" is a fake Omega watch, not a real Omega watch that was manufactured for sale in India and then imported to the USA.
The white-hot center of this stupidity is the watch trade. For example, "genuine Rolex products can only be imported with the permission of the trademark owner, Rolex Watch U.S.A. Inc. A private individual can hand carry one Rolex watch from a trip overseas without obtaining permission. Bring in more than one, and they will all be seized as a trademark violation. Purchasing a Rolex from overseas by mail is also a trademark violation."