The story
From come (“to behave in the manner of; to pretend to be”) + the + old soldier (“former soldier, or one who has served for a long time; one with a lot of experience in something”), in the sense of one taking advantage of their age or experience over someone else.
Etymology from Wiktionary, CC BY-SA 4.0.