There is nothing in the creation besides the most noble of character traits. Anyone who maintains that there exists in the creation inferior character traits, the only inferior thing is his or her beliefs.
Those qualities we consider as bad character traits have only been created by Allah for the sake of being employed in noble ways; it is we who have employed such qualities in harmful ways.
Thus, for example, Allah has created “oppression” so that we may learn to repress our egos by not giving in to all of their passions and choosing to overlook some of their rights for the sake of bringing happiness to others. Instead, people have sought to oppress others in their efforts to satisfy themselves. Similarly, Allah has created the ostentatious display of righteousness only in order that the righteous and the knowledgeable may reveal their good deeds so that others may take them as role models and follow in their example.
Same with deceit. Allah has only created deceit to be used as a means for escaping danger, defending one’s homeland, and for being deferential towards people, one’s wife, children, etc. As for Kufr, Allah has only created it in order that we hide what is ugly, for Kufr literally means covering or concealment. Ingratitude is a form of Kufr, since an ingrate denies Allah’s blessings. By the same token, concealing Kufr is Iman (faith).
Therefore, everything that you consider to be of foul character has only been created by Allah for it to be of noble character
Inspiration 5: The Most Noble of Character Traits