Companies didn't really start things here. Yes, they employed many children in jobs that were quite dangerous, but the reality is that child labor has existed for centuries in one way or another. Why it continued into the factories is a little complicated, but not very.
Consider that families have traditionally worked more or less together. Kids worked on farms, in home-based businesses (weaving, smithing, that sort of thing,) and in the house, generally. Until (roughly) the late 19thC, there was very little outrage or even comment, really on the issue of child labor.
As what may be called traditional labor gave way to factory work, a simple, yet devastating question arose: If mom and dad are working in the factory, who watches the kids? Some were apprenticed out to a master craftsman to learn a trade, some (few) went to a school, and some in larger cities were cared for by extended kinship networks, but many/most (depending on where and when) accompanied mom and dad to work.
This is a simplification of a relatively slow process -- there were a series of steps that led to children actually working in a factory. To keep it manageably short, think of a stage model: stage one was working with mom or dad at whatever the home economy needed. Stage two was going with a parent to a communal work place, maybe doing small tasks while mom or dad worked a loom or made shoes or whatever. Stage three was going along to the factory.
It's quite obvious that companies benefited greatly from this arrangement -- pay mom or dad, get child's labor more or less free, no need to pay enough so workers could either have one income or pay for child care, tax saving in not paying for schools, etc., etc., -- but those companies didn't start the process. They took advantage of a centuries-old system.
In the US, child labor became one of the major pushes for social reform during the late 19th and early 20thC. Reformers pushed for mandatory education, child safety laws, and other ameliorations of the child's plight. There are scads of movements, people, and organizations that pushed for various reforms.
A couple books to peruse if you're interested:
Herbert Gutman, Work, Culture, and Society in Industrializing America
Jim Barrett, Work and Community in "The Jungle."
Wm Rorabough, The Craft Apprentice.
Wm Forbath, Law and the Shaping of the American Labor Movement
Louise Knight, Citizen: Jane Addams and the Struggle for Democracy
Shel Stromquist, Re-Inventing "The People"
And thousands more.