Machines played two major roles in making factories successful during the Industrial Revolution.
First, they allowed factories to produce much larger quantities of th products than could previously be done. This allowed companies to enjoy what are called economies of scale -- where it gets cheaper to make something as you make more of them. This helped allow the companies to sell their products for lower prices.
Second, the machines were much more efficient than working without machines. This meant, again, that factories could produce goods much more cheaply than non-mechanized processes could. This also allowed these companies to sell their products for lower prices.
Lower prices, of course, allowed many more people to buy the products and that allowed the companies that had factories to be successful.