There is a some truth to this statement, but the subject is much more complicated than just that. Free markets allow resources to flow toward those activities that provide the most economic benefit. If I have a project that will result in a 1,000 percent return on investment, the financial markets will be very happy to lend to me, if there is full information about me and the project.
However, there are two important drawbacks to free markets. First, the outcomes might not be fair in some sense. Some children are born into poor families, which might restrict their access to education, health care, financial resources, and justice. Similarly, poorly educated individuals might get stuck being poor for the same sorts of reasons. This is a good argument for social transfers -- where the government steps in and directs part of the economy.
Second, there is probably not full information. Look at the financial turmoil that is occurring right now. Part of the problem is that banks were not able to distinguish between good and poor risks, borrowers did not fully understand the mortgages that they took out, and investors cannot tell which banks are good and which are suspect. Again, this is an argument for government intervention. Free market economies stimulate economic growth in whatever the market seems to profitably want at the time (like pet rocks or pink yard flamingos) not necessarily what will benefit it (as the long-term general welfare of the economy). State directed economies would stifle the growth in pet rocks and pink yard flamingos because these are a waste of limited resources. The state would stimulate growth in something more immediately useful; like the production of war materiel in the US during WWII, or schools or infrastructure. Federal spending (state induced growth) pulled the U.S. out of the depression. The free market had failed