Toward the end of the parsha the Torah relates the incident of the "mekalel." A man, born to an Egyptian father and Jewish mother, got involved in a confrontation regarding the place he chose to pitch his tent. Being that his mother descended from the tribe of Dan, he set up his tent in the area designated for that tribe. His neighbors confronted him and asserted that since his father did not descend from Dan he could not remain among that tribe. The Torah clearly states, "Bnei Yisrael should encamp each man by his banner according to the insignias of theirfathers' household" (Bamidbar 2:2). The dispute was brought before Moshe's beis din. They ruled in favor of the tribe of Dan and the man went out and cursed Hashem.
The Torah continues, "They placed him under guard to clarify for themselves through Hashem" (Vayikra 24:12). Chazal tell us that this incident occurred at the same time as the incident of the mikosheish (the man who gathered sticks on Shabbos in a prohibited manner). Rashi infers from the pasuk that despite the fact that they were both placed in jail at the same time, nevertheless, they were not put in the same cell.
While the Torah does not use jail as a means of punishment, it is used to confine an offender when there is uncertainty as to the punishment deserved. Themikosheish was put into jail because although it was known that he deserved the capital punishment, the method of his execution was not known. In contrast, the man who cursed Hashem was jailed because it was not known if he deserved to be executed. Consequently, he was placed in a separate cell.
What would have been so terrible, asks Rav Wolbe (Shiurei Chumash) if they would have placed both transgressors in the same cell? He explains that although it is quite commonplace in our day and age for someone who was arrested at a protest rally to be placed in the same cell as a murderer, the Torah operates differently. Divine judgment is so exact to the extent that a transgressor who was stoned cannot be buried in the same cemetery as a transgressor who was beheaded. While they were both killed because of their aveiros, they cannot be equated. Likewise, a person who deserves to be executed cannot even be imprisoned alongside someone who might not deserve capital punishment.
There is a timely lesson to be learned from this incident. Rav Itzele Peterburger would say that if two people commit the very same transgression but one gives a groan as he performs the aveirah, the groan is recorded in heaven. Indeed, they both did commit the same aveirah, but they cannot be classified together because the difference between them is like night and day.
Conversely, when one performs a mitzvah, he is rewarded in heaven in proportion to the effort invested. Five minutes of Torah learning when one's body is aching for bed, is worth a whole lot more than when he is well rested and alert. In the same vein we cannot compare ourselves to our neighbors. While we all perform the exact same mitzvos, each mitzvah is so very different from another.