The presence of this verse in this passage is remarkable. It seems such a trivial detail that it hardly deserves to be included in the narrative.
What is the lesson? The answer comes from considering that Joseph, like all of us, is a man with his whole life mapped out for him and known to God in advance. In his case, this has been revealed through the dreams, which have told him what will be the greatest event of all in his life: when he becomes the deliverer of his family. That must come to pass. But here is one little step in the fulfilling of that great plan for his life. It is included to teach us that even the most trivial of happenings in our lives are overseen by the Lord. Don’t say, if Joseph had not met this man while wandering in a field, and if he had not found his brothers and been sold by them to the Midianite traders, God would have found some other way to get him to Egypt. God is not always reinventing his plan. He is not having to continually rethink how he will reach his goal, as if someone is constantly trying to thwart him, and he is having to repeatedly adjust things to keep his plan on track. God has one plan, and it is sure and certain, and it includes every detail along the way. Joseph could look back on what seemed like a chance meeting and know that it was an essential link in God’s chain. Small and great events are all in the hands of the Lord.