First manufactured by Smith & Wesson in 1990, the .40 S&W was created in an effort to duplicate the ballistics of the 10mm FBI load while using a smaller cartridge. The large case of the 10mm FBI load wasted a lot of space and also made it difficult to design a more compact handgun to accomodate it.

Using the same .40" bullet the .40 S&W used a true straight wall case that was just as long as the cases for the 9mmx19. This just was enough to contain enough propellant to drive the .40 cal bullet as fast as it would had it been fired from a 10mm cartridge and gun.

If you look at their calibers, the .40 is indeed a compromise between the light and fast 9mmx19 and the big and heavy .45 ACP.

While it did live up to what it was expected to do, which was to duplicate the 10mm lite ballistics, the .40 S&W like most other things in the world of guns and ammo was just done to fill a need that, IMHO, was more perceived than real.

Now more than 10 years after it was introduced, while widely used in the law enforcement community (whose officers are usually issued their gear and thus have no choice about it) the .40S&W is still considered by many to be a fad round.*

A quote from American Handgunner

Origin Of The .40 S&W Few people outside Smith & Wesson's walls know the true story of the .40 S&W’s origin. The genesis was a pistol Liebenberg built for a trimmed-down 10mm case firing a 180 gr. projectile 1,000 fps. And here is the real story. Liebenberg was a world-class IPSC shooter, a former member of South Africa's elite Springbok IPSC team. He shot world and national championships and the Bianchi Cup and always finished top 16, if not top five. He and another perennial top finisher, Tom Campbell of Smith & Wesson, became friends. Liebenberg told Campbell about the Centimeter, and from there the concept of the cartridge moved on to 2100 Roosevelt Avenue’s decision makers. For Liebenberg, the Centimeter opened Springfield’s historic doors and he was recruited to build a new custom pistolsmithing division called the Performance Center. Meanwhile, with minor modifications, Winchester’s engineers matched the specifications of the cartridge, bringing forth in a joint venture with Smith & Wesson — the .40 S&W.

* - Don't get me wrong, it's as just as lethal as any other high velocity projectile.