The demon in the story symbolizes change. This is because the only thing that the demon leads to in the story is change for all of the people that are involved with it both directly and indirectly. For when the fisherman first finds the demon any of the choices that he is presented with do not lead him back to his old life. Then as soon as the fisherman is able to wrangle a reward out of the demon he changes the life of the king and all of the people that the king interacts with. Meaning that the only thing that the demon truly represents is change.
Two allegories that I noticed in the story presented were that you are treated based on how you treat others and that if you treat people badly that treatment will come back to harm you also. How you are treated is based on how you treat others is first shown in the story of the demon and the fisherman. When the fisherman treats the demon politely and tries to reason with him instead the demon only wants to kill the fisherman and due to this gets imprisoned back in the jar. Then is only released when he promises instead to reward the fisherman for freeing him instead of killing him. When the demon then keeps his promise he is rewarded with his freedom.
That your treatment of others will come back to hurt you is shown at several points in the story. One of the best examples of it though is the end of the story about prince and his wife. After his wife lied to him, cheated, imprisoned and turn the entire population of a city into fish, and tortured the prince. She had the love of her life killed and then was killed herself as punishment for her crimes.