Paul is combating the false theology of the opponents in Ephesus who put too much emphasis on the law. In verse 8, he's going to agree with them that the law is good, but then qualifies that it has to be used as it is intended.
This is one of Paul's many puns that rarely makes it into translations. "The law (νόμος) is good, but it must be used lawfully (νομίμως)." Since that really doesn't make any sense, most translations need to interpret νομίμως.