It is derived from the very first verse; Wayl-ul-lil mutaffifin.
Period of Revelation
The style of the Surah and its subject matter clearly show that it was revealed in the earliest stage at Makkah, when surah after surah was being revealed to impress the doctrine of the Hereafter on the people's minds. This Surah was revealed when they had started ridiculing the Muslims and disgracing them publicly in the streets and in their assemblies, but persecution and manhandling of the Muslims had not yet started. Some commentators regard this as a Madani Surah.
This misunderstanding has been caused by a tradition from Ibn Abbas according to which when the Holy Prophet (upon whom be peace) arrived in Madinah, the evil of giving short weight and measure was widespread among the people there. Then Allah sent down Wayl ul-lil mutaffifin and the people began to give full weight and measure. (Nasa'i, Ibn Majah, Ibn Marduyah, Ibn Jarir, Baihaqi: Shu`ab-il-Iman) But, as we have explained in the introduction to Surah Ad-Dahr, the common practice with the Companions and their successors was that when they found that a verse applied to a certain matter of life, they would say that it had been sent down concerning that particular matter.
Therefore, what is proved by the tradition of Ibn Abbas is that when after his emigration to Madinah the Holy Prophet (upon whom be peace) saw that the evil was widespread among the people there, he recited this Surah before them by Allah's Command and this helped them mend their ways.
Theme and Subject Matter
The theme of this Surah too is the Hereafter. In the first six verses the people have been taken to task for the prevalent evil practice in their commercial dealings. When they had to receive their due from others, they demanded that it be given in full, but when they had to measure or weigh for others, they would give less than what was due. Taking this one evil as an example out of countless evils prevalent in society, it has been said that it is an inevitable result of the heedlessness of the Hereafter.
Unless the people realized that one day they would have to appear before God and account for each single act they performed in the world, it was not possible that they would adopt piety and righteousness in their daily affairs. Even if a person might practise honesty in some of his less important dealings in view of "honesty is the best policy", he would never practise honesty on occasions when dishonesty would seem to be "the best policy". Man can develop true and enduring honesty only when he fears God and sincerely believes in the Hereafter, for then he would regard honesty not merely as "a policy" but as "a duty" and obligation, and his being constant in it, or otherwise, would not be dependent on its being useful or useless in the world.
Thus, after making explicit the relation between morality and the doctrine of the Hereafter in an effective and impressive way, in vv. 7-17, it has been said: The deeds of the wicked are already being recorded in the black list of the culprits, and in the Hereafter they will meet with utter ruin. Then in vv. 18-28, the best end of the virtuous has been described and it has been laid that their deeds are being recorded in the list of the exalted people, on which are appointed the angels nearest to Allah.
In conclusion, the believers have been consoled, and the disbelievers warned, as if to say: "The people who are disgracing and humiliating the believers today, are culprits who, on the Resurrection Day, will meet with a most evil end in consequence of their conduct, and these very believers will feel comforted when they see their fate."