"Unauthorized practice of law" only applies to people, not tools. AI is a tool. DoNotPay was not selling legal advice, only a tool to understand law. It is no different if they were selling a code book, or other text that the defendant uses himself. I think the real fear is that AI will supplant the entire legal profession.
The legal profession went through a similar struggle when Nolo published software that could draft basic legal documents by filling in the blanks. Nolo won.