A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
deu 25:2STRIPES MUST NOT EXCEED FORTY. (Deu. 25:1-19)
if the wicked man be worthy to be beaten--In judicial sentences, which awarded punishment short of capital, scourging, like the Egyptian bastinado, was the most common form in which they were executed. The Mosaic law, however, introduced two important restrictions; namely: (1) The punishment should be inflicted in presence of the judge instead of being inflicted in private by some heartless official; and (2) The maximum amount of it should be limited to forty stripes, instead of being awarded according to the arbitrary will or passion of the magistrate. The Egyptian, like Turkish and Chinese rulers, often applied the stick till they caused death or lameness for life. Of what the scourge consisted at first we are not informed; but in later times, when the Jews were exceedingly scrupulous in adhering to the letter of the law and, for fear of miscalculation, were desirous of keeping within the prescribed limit, it was formed of three cords, terminating in leathern thongs, and thirteen strokes of this counted as thirty-nine stripes (Co2 11:24).
deu 25:4Thou shalt not muzzle the ox when he treadeth out the corn--In Judea, as in modern Syria and Egypt, the larger grains were beaten out by the feet of oxen, which, yoked together, day after day trod round the wide open spaces which form the threshing-floors. The animals were allowed freely to pick up a mouthful, when they chose to do so: a wise as well as humane regulation, introduced by the law of Moses (compare Co1 9:9; Ti1 5:17-18).
deu 25:5the wife of the dead shall not marry without unto a stranger: her husband's brother . . . shall take her to him to wife--This usage existed before the age of Moses (Gen 38:8). But the Mosaic law rendered the custom obligatory (Mat 22:25) on younger brothers, or the nearest kinsman, to marry the widow (Rut 4:4), by associating the natural desire of perpetuating a brother's name with the preservation of property in the Hebrew families and tribes. If the younger brother declined to comply with the law, the widow brought her claim before the authorities of the place at a public assembly (the gate of the city); and he having declared his refusal, she was ordered to loose the thong of his shoe--a sign of degradation--following up that act by spitting on the ground-- the strongest expression of ignominy and contempt among Eastern people. The shoe was kept by the magistrate as an evidence of the transaction, and the parties separated.
deu 25:13Thou shalt not have . . . divers weights--Weights were anciently made of stone and are frequently used still by Eastern shopkeepers and traders, who take them out of the bag and put them in the balance. The man who is not cheated by the trader and his bag of divers weights must be blessed with more acuteness than most of his fellows [ROBERTS]. (Compare Pro 16:11; Pro 20:10).
deu 25:17Remember what Amalek did--This cold-blooded and dastardly atrocity is not narrated in the previous history (Exo 17:14). It was an unprovoked outrage on the laws of nature and humanity, as well as a daring defiance of that God who had so signally shown His favor towards Israel (see on 1 Samuel 15; 27. 8; 30).