In 27:3, as the daughters of Tzelafchad ae presenting their case why they should be allowed to inherit the lands of their deceased father, they say, "[Our father] was not among the congregation..."
Rashi explains their words that Tzelafchad had died for a private sin, not for participation in the sin of Korach or that of the complainers.
The daughters of Tzelafchad are making a very important distinction for us. There is a big difference between doing something in public and between doing something in private.
What is the difference? Either way it was a sin whose punishment was that of death!
They are telling us that when a sin is committed in public, where it can possibly influence other people, that is so much more serious. When done in private, it is between man and God and nobody else is involved or influenced.
Therefore a private sin, while still deserving of death, will have less serious consequences and ramifications.
And ultimately their claim was accepted by Hashem