As an aside, militias actually work pretty well if they're well-trained and motivated. Just ask the Northern Italian communes or the Scandinavians, who both waged their Medieval wars to a large degree with infantry militias (if only because neither had much of a feudal warrior aristocracy to draw on). Or the urbanized Low Countries or the Swiss Cantons, whose militia armies shattered feudal war-hosts often enough. (That this also created a demand for them as mercenaries, ie. professional soldiers, abroad is besides the point; younger sons of the nobility, who didn't inherit estates, similarly tended to go around in search of a war to earn a living with their skills with.)

Given the general poverty of the common populace, nevermind now random disasters like crop failures, wars, bandits and any number of other calamities (not to forget any personal issues, such as legal difficulties, forcing an individual to leave their homes), joining an army in return of a reasonably regular pay and meals also had its attractions. Indeed in regions where military service was an obligation it was pretty much the norm for a paid substitute to be a perfectly acceptable replacement - after all, the important thing was getting an able-bodied man in the ranks, not his specific identity.

Heck, in the 1745 Scottish uprising hired substitutes were common enough in the rebel army that the British authorities treated them as a distinct group after the fact (the other two being people pressed to service under duress, typically by clan headmen, and genuine rebels).

And in a war zone people often joined armies in some capacity simply because it tended to be far safer to be in one, where you were surrounded by a lot of basically friendly armed people, than be outside one, at the mercy of the blasted ironclad locust hordes ravaging the countryside.

All in all, most folks volunteered into the ranks simply as a means of making a living. You more likely than not did not live to an old age obviously (which rather contributed to the general rapaciousness of soldiery - they were quite literally living like each day might be their last), but starving to death kinda sucked too. And if you were talented and lucky, you might actually manage to pull off a major social rise through the career - some quite low-born men ended up created nobility that way, and bona fide aristocrats sometimes came out with considerable additions to their personal fortunes and/or estates.

And of course many simply did not have a choice, save for running off into the wilderness to avoid the authorities or finding someone else to go in their stead - many Early Modern states realized right quick drafted conscripts worked well enough in armies based on linear tactics and firepower, and proceeded to create thorough and efficient bureaucracies to be able to tap that manpower pool. Much of the basis of modern "Westphalian" state systems was originally created to meet the resource needs of the Thirty Years' War participants, particularly the poorer ones like Sweden (Brandenburg, later better known as Prussia, would soon after start seriously pushing the envelope in this regard), which had to make the utmost of what little they had if they were to get something done. Others, like Russia, pretty much just handed their feudal landowners manpower quotas - unsurprisingly the lords then sent the crap bottom of their serfs, the men they could easiest afford to lose (the families of the conscripts in fact held funeral rites for them and in most respects regarded them as already dead - few ever came home alive from the twenty-plus year stint in the Early Modern Czarist Russian military).