Why isn't all of the dust in a nebula used in the formation of a star? I was watching a show on discovery and according to it, in a nebula the dust and gases slowly come together and as the gravity increases and the pressure rises in the core the gases fuse together and a star is born and the rest of the left over dust and gases come together and form planets and moons.
So my question is that isn't all of the dust and gases used in the formation of the star?   Why is some of it left and used to form planets, or why it is not sucked by the newly born star due to it's gravity.  Why does the left over turn into planets and not other stars?
 A: In my opinion that "collapsing nebula" image is somewhat misleading, because the trajectory of dust/gas particles would be (ignoring magnetic field) an orbit and not a free fall collapse. However collisions make particle change orbit, and the particles whose new orbits comes closer to the future sun experience more collisions (because of the higher density there) and eventually end up within the sun.
But after the collision, if one of the particles ends up going towards the sun, the other ends up going away ; this ensures that some of the mass never reaches the sun.
This process also allows other "higher density" regions to gather mass, and those end up being planets (or indeed other stars if the available mass is high enough).
However when a star forms, the wind it produces blows most of the leftover out of the solar system. Only the leftover which has reached a high enough size & density stays in orbit around the sun.
A: 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. 

