R’ Leibele Eiger (here) frames the question perfectly (not that he needs my haskama). Recall that the brothers had incorrectly judged Yosef to be deserving of death. They threw him in a pit simply to avoid direct bloodshed. They then decided to let him off and “merely” sell him as a slave. All this was done because their jealously blinded them to Yosef’s true tzidkus. So what if G-d intervened and not only thwarted their plan, but turned that plan on its head so that Yosef ended up rising to greatness in Egypt? So what if Yosef could now use his position to now provide food and sustenance for his family, “ki l’michya shlachani…?” Had Yosef not been sold, surely G-d would have arranged some other means of the family surviving the famine. The bottom line remains that the brothers erred in their judgment and if not for G-d’s intervention would have caused tremendous harm.
How does the fact that there was a positive outcome (that they had nothing to do with) absolve the brothers of the need for remorse, regret, and acceptance of guilt?