Qualify has many meanings, including to provide with necessary skills, knowledge or credentials. In law qualify means to certify as legally competent or to actions necessary to acquire legal power.
However, another important meaning of qualify is to limit or restrict. Thus it is said that one provision of a statute qualifies or modifies another. And, notably, an unqualified legal opinion is one without exceptions or limitations, not one written by a substandard lawyer.