Young Goodman's Brown experience changed the way he looked at the world when he had a supposedly dream or actually experience an encounter with the devil. The moral out of this whole story is that the things you go through whether it is fiction or not can drastically change on how you view things. Throughout the story it was really fore shadowing the fate that the protagonist was gonna have.
Young Goodman's Brown encounter with the Devil had him losing everyone around him it started when the Devil talked to Brown's old teacher and to his surprise the old woman was friends with the Devil. I believe that the devil was trying to make him see all the people he ever cared about as some bad people that lied to him throughout his life. Eventually it started talking about a pink ribbon which his wife wore and that symbolized her. In the beginning of the story the author introduced us to his wife which was faith, later when Young Goodman Brown is arguing with the Devil that he can not continue forward in the path because he is attached to his wife faith the ribbon later the ribbon falls from the sky which symbolizes him losing all faith in himself that he could get through without following the devil. As he lost the last person that was helping him to fight the temptation he gave in and became this really cranky and rude person.