Malarkey may be the intent. Knowing the case is nonsense and having no expectation of winning, you press on because even if eventually found not-guilty, the process of the defendant getting there if prosecuted can be used to destroy their career, reputation, finances, etc. Enough that it still feels like a win to the state, who rarely has much to lose in a relative sense.