In the days of antiquity, being in the cavalry was a privilege specifically reserved for those who ranked higher in the social order than the common people. Those who were too young, too inexperienced, or too poor to have a horse, usually ended up in a type of combat unit specifically named for them: the infantry.
From the early days of warfare on up through the Middle Ages and beyond, war was a socially stratified activity, just like anything else. The leaders of a country needed able-bodied men to fight the wars, and they needed those men to already have the skills and experience necessary to fight wars. The problem is that most of those men definitely did not have the skills and experience necessary to fight wars. If a country didn't have a standing professional army and used mostly the rabble picked from its towns and cities, chances are good, it was filled with infantry.
The word "infantry" is just as its root word suggests. Derived from the latin word infans, the word literally means infancy. Later versions of the word became common usage in French, Old Italian, and Spanish, meaning "foot soldiers too low in rank to be cavalry.
The last thing you see when you're too poor to own a horse and no one thought to bring pointy sticks.
As if walking to the war and being the first to die from the other side's cavalry charges wasn't bad enough, your own cavalry referred to you as babies or children. Another possible Latin origin of the phrase would also describe infantry just as well. The word infantia means "unable to speak" or perhaps more colloquially, "not able to have an opinion." The latter word might describe any infantry throughout history. As a conscript, you were forced into the service of a lord for his lands and allies, not given a choice in the matter.
In the modern terminology for infantry, this is probably just as true, except you volunteered to not have an opinion. At least now, you get healthcare and not cholera.