Why was there this difference in behavior? A key difference was the leadership from their commanders. Union generals decried the behavior of their troops on many occasions but the instances of looting, marauding, and destruction were so widespread that they don't seem to have been very effective at stopping it. However, the moral authority of someone like Lee and the character of the regular Southern soldier seems to have made a difference.
Here is an example of Northern leadership from the Official Records:
HEADQUARTERS DEPARTMENT OF WEST VIRGINIA,And here is contrasting one from the South.
In the Field, at Rude's Hill, Va., May 30, 1864.
Major T. QUINN,
Commanding First New York Cavalry:
MAJOR: You will detail from your command 200 men, with the proper complement of commissioned officers, to proceed to Newtown to-morrow morning at 3 o'clock, for the purpose of burning every house, store, and out-building in that place, except the churches and the houses and out-buildings of those who are known to be loyal citizens of the United States. You will also burn the houses, &c., of all rebels between Newtown and Middletown. You will spare the house and premises of Dr. Owens, at Newtown, he having been very kind to our wounded soldiers; and where the burning of the house or out-buildings of the rebel shall not be burned. You will report back to these headquarters, making a written report of the expedition.
This by command of the major-general commanding [Hunter]:
I am, major, very obediently, yours,
[P. G. BIER,]
Assistant Adjutant-General.
GENERAL ORDERS, Numbers 73. HDQRS. ARMY OF NORTHERN VIRGINIA, Chambersburg, Pa. June 27, 1863.
The commanding general has observed with marked satisfaction the conduct of the troops on the march, and confidently anticipates results commensurate with the high spirit they have manifested.
No troops could have displayed greater fortitude or better performed the arduous marches of the past ten days.
Their conduct in other respects has, with few exceptions, been in keeping with their character as soldiers, and entitles them to approbation and praise.
There have, however, been instances of forgetfulness, on the part of some, that they have in keeping the yet unsullied reputation of the army, and that the duties exacted of us by civilization and Christianity are not less obligatory in the country of the enemy than in our own.
The commanding general considers that no greater disgrace could befall the army, and through it our whole people, than the perpetration of the barbarous outrages upon the unarmed and defenseless and the wanton destruction of private property, that have marked the course of the enemy in our own country.
Such proceedings not only degrade the perpetrators and all connected with them, but are subversive of the discipline and efficiency of the army, and destructive of the ends of our present movement.
It must be remembered that we make war only upon armed men, and that we cannot take vengeance for the wrongs our people have suffered without lowering ourselves in the eyes of all whose abhorrence has been excited by the atrocities of our enemies, and offending against Him to whom vengeance belongeth, without whose favor and support our efforts must all prove in vain.
The commanding general therefore earnestly exhorts the troops to abstain with most scrupulous care from unnecessary or wanton injury to private property, and he enjoins upon all officers to arrest and bring to summary punishment all who shall in any way offend against the orders on this subject.
R. E. LEE, General.
Headquarters Military Division of the Mississippi,
In the Field, Kingston, Georgia, November 9, 1864
1. For the purpose of military operations, this army is divided into two wings viz.: The right wing, Major-General O. O. Howard commanding, composed of the Fifteenth and Seventeenth Corps; the left wing, Major-General H. W. Slocum commanding, composed of the Fourteenth and Twentieth Corps.
2. The habitual order of march will be, wherever practicable, by four roads, as nearly parallel as possible, and converging at points hereafter to be indicated in orders. The cavalry, Brigadier - General Kilpatrick commanding, will receive special orders from the commander-in-chief.
3. There will be no general train of supplies, but each corps will have its ammunition-train and provision-train, distributed habitually as follows: Behind each regiment should follow one wagon and one ambulance; behind each brigade should follow a due proportion of ammunition - wagons, provision-wagons, and ambulances. In case of danger, each corps commander should change this order of march, by having his advance and rear brigades unencumbered by wheels. The separate columns will start habitually at 7 a.m., and make about fifteen miles per day, unless otherwise fixed in orders.
4. The army will forage liberally on the country during the march. To this end, each brigade commander will organize a good and sufficient foraging party, under the command of one or more discreet officers, who will gather, near the route traveled, corn or forage of any kind, meat of any kind, vegetables, corn-meal, or whatever is needed by the command, aiming at all times to keep in the wagons at least ten days' provisions for his command, and three days' forage. Soldiers must not enter the dwellings of the inhabitants, or commit any trespass; but, during a halt or camp, they may be permitted to gather turnips, potatoes, and other vegetables, and to drive in stock in sight of their camp. To regular foraging-parties must be intrusted the gathering of provisions and forage, at any distance from the road traveled.
5. To corps commanders alone is intrusted the power to destroy mills, houses, cotton-gins, etc.; and for them this general principle is laid down: In districts and neighborhoods where the army is unmolested, no destruction of such property should be permitted; but should guerrillas or bushwhackers molest our march, or should the inhabitants burn bridges, obstruct roads, or other -wise manifest local hostility, then army commanders should order and enforce a devastation more or less relentless, according to the measure of such hostility.
6. As for horses, mules, wagons, etc., belonging to the inhabitants, the cavalry and artillery may appropriate freely and without limit; discriminating, however, between the rich, who are usually hostile and the poor and industrious, usually neutral or friendly. Foraging-parties may also take mules or horses, to replace the jaded animals of their trains, or to serve as pack-mules for the regiments or brigades. In all foraging, of whatever kind, the parties engaged will refrain from abusive or threatening language, and may, where the officer in command thinks proper, give written certificates of the facts, but no receipts; and they will endeavor to leave with each family a reasonable portion for their maintenance,
7. Negroes who are able-bodied and can be of service to the several columns may be taken along; but each army commander will bear in mind that the question of supplies is a very important one, and that his first duty is to see to those who bear arms.
8. The organization, at once, of a good pioneer battalion for each army corps, composed if possible of negroes, should be attended to. This battalion should follow the advance-guard, repair roads and double them if possible, so that the columns will not be delayed after reaching bad places. Also, army commanders should practice the habit of giving the artillery and wagons the road, marching their troops on one side, and instruct their troops to assist wagons at steep hills or bad crossings of streams.
9. Captain O. M. Poe, chief-engineer, will assign to each wing of the army a pontoon-train, fully equipped and organized; and the commanders thereof will see to their being properly protected at all times.
By order of Major-General W. T. Sherman,
L. M. Dayton, Aide-de-Camp.
But I have pointed out to you two Northern acknowledgments that two different Confederate invasions of the North had been relatively free of that.
That was the popular misconception, but recent research has challenged that. Both Noah Andre Trudeau and Stephen Sears wrote books recently on the Gettysburg campaigns and detail the fact that looting and pillaging of private property in Pennsylvania and Maryland by a minority of the confederate soldiers was not uncommon. Evidence seems to indicate that the order of Lee's that you quoted, issued after the army had entered Maryland and Pennsylvania, was issued in response to reports of looting and other misbehavior by ANV soldiers against civilians. As the authors also point out the order was widely ignored.