King Thrushbeard, after being insulted by the unkind princess, disguised himself as a beggar and married the princess, making her realise all that she lost because of her foul behaviour and also about all the hardships in life outside of the palace. This made the princess reflect on her behaviour and improve.