The Sell-sword principle.
Yes Sell Swords will leave you if you are losing a war and are about to march into certain defeat all to save face – anyone who isn’t blindly loyal might consider leaving you. However when it comes to war, have you ever known sell-swords to turn from a winning battle because they were just: “tired of fighting?”
The Sell-Sword principle; the idea that they are loyal to you – and yes they are paid – and they will never back-stab you but they will not follow you into death all because you are utterly incapable of seeing defeat when it sat in front of you and you kept on going. See sell-swords are only able to sell their swords if they are alive to apply their trade – dead men cannot collect coin.
Stannis Baratheon cursed when 500 sell-swords left him in the night on his march to Winterfell because they knew his campaign was a lost cause. Indeed he was mad to the point where he would march into certain defeat hoping to snatch victory – a foolish notion at best a death sentence at worst (and it was his end).
Same goes for professional armies: these soldiers are loyal to you but they are not blindly loyal to you. Soldiers are people and people just want to have a job and a happy life; forget death or glory and forget the flag, soldiers fight for home and hearth. The individual soldier’s motivation can differ from one man to another (or woman), and ultimately they are there to make a living (though it is a vocation rather than a job – the mindset is needed to do such work).
Sure nobles in ancient times scoffed at the idea of sell-swords, but have you ever known sell-swords to turn on their customers or fail to show up for work when asked to do so? These soldiers are professionals, and they cannot get work if they are incompetent; they also cannot get work if they are dead – war isn’t a profession that is forgiving of accidents.
Ultimately the point to all of this is a sell-sword mindset is one of self-preservation and professionalism; scoff at it all you like but being an unpaid levy/conscript who is blindly loyal is not the path to take – professional soldiers will not turn on you but they will not simply die for you either.