Transforming the bureaucracy into something more like a large startup business, hungry to expand, yielded dramatic results.