To properly answer the question, let us first remember who is Dunstan and why his role in the story matters. Dunstan is the youngest son of the Cass clan, who are a powerful family in the town. They are business owners, and represent Raveloe "royalty". However, Dunstan is chaotic, destructive, and mean. He controls his brother Godfrey, fooled him in business, and has every bad quality that his father, self-made success Squire Cass, would have never dreamed for a son.
Dunstan is also the thief that discovers Silas's gold and, during a cold, Winter night, waited until Silas was gone and took it. He may have not even needed the gold that bad; he just wanted it because it was there for the taking, and because he is a thief.
The result of Dunstan's unstable personality reflects in his comings and goings from and to the city. Particularly, after the last row he had with his father over killing Wildfire the horse, there was no doubt that he may have left the town in shame. In chapter X we find that
Dunstan Cass's absence was hardly a subject of remark; he had once before had a quarrel with his father, and had gone off, nobody knew whither, to return at the end of six weeks, take up his old quarters unforbidden, and swagger as usual.
Chapter 10 also tells us that even his own family seemed to not have noticed the extent of the absence, even when his Uncle Kimble and Mr. Osgood realized it. No one could make a connection between his disappearance and the robbery either, for whatever reason that the novel does not fully explain. However, it is clear that Godfrey too was unable to connect Dunstan to the robbery because Silas was merely a subject of joke between the brothers since they were children and, in all the time that he had been with Dunstan, Godfrey had never heard Dunstan mentioning Silas for any reason at all. Moreover, Godfrey had made so many alibis for his brother that his tendency was to imagine that he was somewhere out there and up to no good.