The ending brings three strands together. First: Abū Zayd’s hair and beard have changed, making him harder to recognize. Second: his poetic skill and taste remain unmistakable. Third: he interprets his condition through the language of trial, patience and dignity.
This returns us to the gathering’s earlier judgement. The audience initially underestimated his outward condition, then recognized his ability. The image of gold in fire expresses the same distinction: circumstances may test a person without defining their essential worth.