R' Elchanan highlights one pasuk in particular from the parshiyos of Yosef and his brothers as holding a profound moral lesson: "Aval asheimim anachnu al achinu" -- we are guilty for causing what has transpired (42:21). We look at events and wonder why things are as they are; human nature dictates that we assign blame to someone or something else where there is blame to be apportioned and point the finger at ourselves only when there is credit for the taking. Not so the brothers of Yosef -- they recognized that the fault for their suffering rested on their shoulders alone. It's not the economy, stupid, or any other force out there that dictates the fate of Klal Yisrael. It's asheimim anachnu.
I would just add a few points. As the Rishonim point out, the brothers do not confess to being wrong in their judgment of Yosef, but express remorse at not listening to his pleas for mercy. At times we must take unpleasant action, but that does not mean we should savor unpleasantness or be deaf to reconsideration or reconciliation. The brothers realized that even this small degree of callousness carried with it an enormous price.
This expression of guilt is years after the sale of Yosef. Undoubtedly the brothers did not act in haste and did not sell Yosef without careful consideration and deliberation. I don't think there was an expectation that what they did would come back to haunt them in the way that a criminal (l'havdil) has perhaps a sense of foreboding that his crime will be discovered (e.g. Dostoevsky's "Crime and Punishment"). Yet, there apparently is nothing else which occurred in the intervening years which the brothers could attribute their bad fortune to and they were forced to reconsider what they had done. Amazing.