Nephi explains that our actions in this life carry consequences into the next. If our works here are filthy, they continue to condemn us in the next life, as no unclean thing can enter the kingdom of heaven. This dynamic is a function of universal law and therefore is a consequence of our actions, not a capricious decision.
Nephi uses the phrase “no unclean thing.” In modern Christian terminology, sin makes us unclean before the Lord. Mosaic law saw a state of ritual purity. When Nephi contrasts “filthy” works with “clean,” he does so in the context of living the law of Moses faithfully.