"Lawful" (order) and "chaos" (chaotic) are concepts used in many role-playing games and literary works as indicators of character and moral stance. These concepts are often understood along a different axis than good and evil.
Unlike the moral axis of good and evil, "Lawful" and "Chaos" are solely about the methodology of "how to act. For example, a "Lawful Good" character (pursuing goodness while following order) is often portrayed as one who does justice while respecting the rules of society. On the other hand, a "Chaotic Good" character (pursuing good while respecting chaos) is often portrayed as a being who tries to accomplish good even if it means breaking the rules.
For this reason, there exists a way of thinking that does not necessarily view chaos as "evil". Chaotic characters can also pursue good, they just differ from orderly characters in their means and mindset. Likewise, an orderly character can also act for evil.
In short, the concept of order and chaos should be understood as indicating a methodology of action or philosophy separate from the moral values of the character.
This page is auto-translated from /nishio/善悪ではないlawfulとchaos using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.