Anarchy is not chaos. All it means is there isn't a higher sovereign authority. International relations, for example, are considered anarchic because there is no single absolute authority over all countries (international organizations are by no means sovereigns), but they can certainly be civil, and cooperation happens more often than you'd think. I'll stop myself there to avoid being censored, but I think I got the point across.
Anarchy as a philosophy relies on the idea that peoples' inherent good tendencies will lead them to treat each other justly and have a functional society, provided they are not restrained or oppressed by authorities. So although the only law under anarchy is inner morality, it is possible for an anarchist to be considered "Lawful" in the D&D sense.