It didn’t start when he joined the Continental Army in 1775. Charles was predisposed to crabbiness. His father was a British major general and his mother was descended from landed gentry. He was the youngest child, and the only son to survive to adulthood. A place of stature had been carved out for Charles, and he meant to have it.
He pursued a career in the British Army and served in the colonies during the French and Indian War, where he met George Washington and Thomas Gage. When the war was over he went adventurin', getting into duels, hanging out with kings, and sticking it to the Ottoman Empire, which is always a good idea.
But his complaining, about his superiors in the army and THEIR superior, King George III, meant that England was a bit too hot for Charles. So he and his little dog went to America to see what kind of trouble they could get into.
Which in part meant, just maybe, being appointed commander of the Continental Army instead of George Washington.