Today we see the perfect example in the first reading of why we cannot judge properly even our own situations.
When Joseph's brothers sold him into slavery they did so with malice their hearts. They were jealous of their father's love for Joseph. By any objective standard it was sin, probably moral sin.
Today's reading ends with Joseph saying, "But now do not be distressed and do not reproach yourselves for having sold me here.It was really for the sake of saving lives that God sent me here ahead of you.”
Did the brothers sell him (a sin) or
Did God send him there ahead of them (part of God's plan)?
The answer is both. The brothers had free will and chose to sin, but because God knew what they were going to do, he had already worked that variable into his plan. God has given human beings free will, knowing full well that at times we will misuse it. Like the perfect parent sometimes he has to let us fall down, let us get hurt, let us learn the hard way, and develop virtue over time. Simultaneously there is an overarching plan, and for those who seek to do God's will there can never be ultimate destruction. In the words of Ps 16
For you will not abandon my soul to Sheol,
nor let your devout one see the pit.
You will show me the path to life,
abounding joy in your presence,
the delights at your right hand forever.
Such is the perfect love of God.