From the beginning the 959 project was intended to be a technology study rather than just another supercar. As the company was earning more and more profit from the success of 924 / 944 series, Porsche generously poured in excess of $100 million US dollars into the project, most went to the development of advanced 4-wheel drive, engine, aerodynamics and advanced materials. Porsche believed most of these technologies would benefit production models in the future, or at least keep their engineers state-of-the-art. Now we know only the 4WD system was simplified and applied to the 911 Carrera 4 of 1989.
Anyway, because time and cost were not constraints during the development of 959, no wonder it could be so sophisticated and so well developed.
Development
Basically, the 959 was based on 911's monocoque chassis but with tracks widened and covered with advanced materials such as Kelvar. The flat six engine was derived from 962's racing engine. 4WD was a completely new development and was then tested in a 911 Carrera 4x4 in the 1984 Paris-Dakar rally.
The first prototype, named "Group B" rather than "959", was unveiled in the '83 Frankfurt motor show. It stunned the whole world by its radical specifications but actually it was more a show car than a running prototype. It was called Group B because Porsche designed it to comply with the requirements of FIA Group B racing category. This was, however, never applied.
In the 1985 Frankfurt show, Porsche unveiled a final prototype whose appearance would be carried over to the production car. Most mechanical development was completed, except the complex PSK 4-wheel drive system which met some difficulties. After one year of delay, the first production-ready car was unveiled to journalists in 1986. In April 1987, the first 959 was delivered to Dr. Wolfgang Porsche, the youngest son of Ferry Porsche.
In order to satisfy the minimum requirements of Group B homologation, a limited run of 200 cars was originally planned, but eventually 230 went out of the factory due to strong demand.
Cost
Porsche sold every 959 for DM 420,000 ($225,000 USD), which could buy a Lamborghini Countach plus a Ferrari Testarossa. Nevertheless, that was still a bargain considering the long list of technology involved - sources estimated the cost of every 959 was $530,000. This means Porsche might made a loss of some $70 million in the production run of 230 cars.