Commentators explain that the unfaithful Levites faced a clear consequence for their past idolatry: demotion. They were barred from the highest priestly duties. Yet, in an act of mercy, they were not completely cast out. They were still permitted to serve in God's sanctuary in lesser, but still necessary, roles like gatekeepers and assistants. This shows that God's discipline includes both justice and a path for continued, albeit humbled, service.