Parshat Vayeshev describes the story of Yosef’s deteriorating relationship with his brothers, and their plot to kill him as a result. The Torah tells us that Reuven came to Yosef’s rescue and saved him from their hands (37:21). However, the story itself doesn’t play out that way. Reuven suggests that the brothers throw Yosef into a deadly pit instead, which they do, but then Yehuda suggests that they sell him into slavery instead. It turns out that Reuven’s idea didn’t end up saving Yosef at all, so why did the Torah say that it did?

The Lekach Tov explains that while ultimately Yosef wasn’t actually directly saved by Reuven’s actions, because his intentions were to do the right thing G-d considers that Reuven actually saved him. While this shows the importance of proper intentions, and the credit one gets for actions done for the right reasons, it also highlights the effect our actions may have on others.
It could also be that the reason why G-d considers intentions relevant is because from Yosef’s perspective, it seemed like all his brothers were against him, while he genuinely felt like he was doing the right thing. It must have been a very lonely feeling, having no one on your side, not even your own brothers. All that changed when Reuven attempted to protect Yosef, and while ultimately that didn’t prove to be effective, perhaps it gave Yehuda the spark to suggest selling him instead. Reuven’s “failed” actions may have sparked hope in Yosef, and an idea within Yehuda that ultimately benefited everyone. All Reuven had to do was try, and that’s all that’s ever asked of us.