In the first chapter of Paul's epistle to Titus, Paul deals with a problem that was perennial throughout his ministry: people speaking vociferously in support of the Law, insisting they were on God's side, when in fact they were not. Legal-ness is not next to godliness.
Legalism is a particularly popular and dangerous form of godlessness. Its power is the appeals it makes to previous commandments or ordinances. Like the ancient Hebrews who had taken to worshipping as an idol the brazen serpent that God once commanded Moses to forge (2 Kings 18:4), legalists make idols of past or particular commandments that they latch onto for their own (usually ego-driven) reasons. Because their concern is about commandments, they like to see themselves as more obedient than everyone else.
Titus chapter 1 begins with an interesting frame for his later discussion of law. He writes of eternal life "promised before the world began," "but... in due times manifested" (vs. 2-3). This is about as concise a statement as you can find anywhere in scripture about progressive revelation of eternal principles. None of us, in other words, yet know the full mind of God, which has existed since before time in relation to our understanding. What understanding we do get is "manifested" in "due times," progressively. This is why Mormons insist that faithfulness comprises obedience to modern day revelation. What is most important is, What does God have to tell us now? Knowing this requires a current, living relationship with a living God.
It is that failure to be attentive to what God is telling us now that constitutes damning disobedience (damning in the classical Mormon sense of being stymied in one's progress). This is why, when Paul speaks later in the chapter of the "unruly, vain talkers and deceivers," he means "specifically, they of the circumcision" (v. 10). This is an interesting conjunction of descriptors, since, in the cultural context of his time, "they of the circumcision" would widely have been understood as synonymous with "those most obedient to the law of God." "They profess that they know God," said Paul (v. 16). It was this "obedient" class that Jesus clashed with time after time during his own ministry; and the "obedient" class that made it their mission to silence Paul. Paul, for his part, insisted it was they "whose mouths must be stopped, who subvert whole houses, teaching things which they ought not" (v. 11), condemning the obedience they were preaching as "fables" and "commandments of men" (v. 14).
It is significant that Paul then addresses the issue of "purity," a typical preeminent concern of those who idolize obedience. True purity, for Paul, was a product not of zealous obedience to outward ordinances, but of adherence to God's higher law of love. "Unto the pure all things are pure," says Paul, "But unto them that are defiled and unbelieving is nothing pure; but even their mind and conscience is defiled" (v. 15). Compare, for example, with 1 Corinthians 10:23, "All things are lawful for me, but all things are not expedient." (This was an awareness that Martin Luther capitalized on in the Reformation and that provoked accusations of antinomianism by his opponents. It would be truly antinomian, of course, only if one denied the discipline love demands of us.) Obsession with pure obedience, ironically, defiles us; while ability to forgive opens the gates of forgiveness (and purity).
"Unbelieving," here, would be inability to trust in the love of God, as communicated through the Atonement. Paul described them as "defiled," I think, because of their inability to see purity in themselves, or to see or appreciate it in others, thriving instead on condemnation.
Paul wasn't exaggerating here when he speaks of "whole houses subverted" by legalism. "Houses" stands here nicely for any kind of polity. Legalism poisons all our relationships with authority -- whether it is household authority, ecclesiastical authority, or political authority. Once the idolatrous demon behind the mask of "perfect obedience" is exposed, trust is often irreparably destroyed. Legalism presents us an idolatrous image of God as tyrant, so one of the first things to go once we recognize the deception is our faith in God. Until, and unless, that is, we are able -- by the grace of God -- to recover some meaningful sense of God as Love.