Mercenary corporations have long had a hard time of things, but over the long haul, they save so much money compared to having a standing army, that they continue on. Much of the 30 years and 100 years wars were fought with mercenaries.
Standing armies are a relatively recent historical phenomina. Before them you had 2 things: the medieval system of lord/vassal military obligation & the pros — who were the mercenaries.
Medieval lord/vassal relationships eventually got so complicated that the king could never be sure who would show up when the call came (blood relationships were increasingly tangled). But as long as the king had the coin, he could always rent a competent military force for the duration.