There are several reasons. One is that when a cloud of gas and dust collapse into a star forming region, it becomes unstable to gravitational fragmentation and usually forms filamentary structures. The gas that lies outside of the densest regions is often not dense enough to be itself then gravitationally unstable. This behaviour is clearly shown in modern simulations of the star formation process.
For example: see the simulations by Mathew Bate at http://www.astro.ex.ac.uk/people/mbate/Cluster/cluster500RT.html
The second reason is feedback from the formed stars. A newly formed star will heat the surrounding gas making it less likely to form new stars and possibly even to make it escape from the gravitational potential of the star forming region. This will especially be true of high-mass stars which will have large luminosities, but can also inject momentum into the gas via their strong winds. However, even low-mass protostars can inject energy back into the gas through outflows driven by their accretion processes. Examples of this are clearly seen in Herbig Haro objects.
Third, it is possible that gas can escape from the star forming region potential simply by being stripped by tidal forces in the Galaxy or by encounters with another giant molecular cloud.
Star formation is not a terribly efficient process. Whilst estimates are difficult, it seems most likely that efficiencies of 10% or lower are common (where this means that only 10% of the initial gas gets turned into stars). The rest gets driven off by heating and feedback processes so that by an age of 10 million years there are essentially no star forming regions (or rather regions that have recently formed stars) that contain significant quantities of gas.
EDIT: I realise I misread the question slightly and answered in terms of the overall star formation efficiency. Once a protostellar "core" has formed then some of its mass will form a protostar, some of the mass will be ejected in outflows and a very small fraction of the mass, maybe 10% or less will end up in an accretion disk around the protostar. The reason for the disk is angular momentum - it must be shed prior to accretion, so cannot fall directly onto the protostar. If the accretion timescale is long enough (and it appears to be), then planet formation may take place before the gas has accreted onto the star or been ejected in outflows and winds from the disk.
So it is just a timescale thing. If planets don't form quick enough then the disk is either dissipated or accreted. Fortunately (for us!) it appears that it is quick enough - the new ALMA sub-mm pictures of HL Tau (see below, credit: ALMA (NRAO/ESO/NAOJ); C. Brogan, B. Saxton (NRAO/AUI/NSF)) suggest it is already well underway within the first million years, whereas disk dissipation takes a few million years or longer.