Yes, and the warning of consequences for attorneys who initiate frivolous litigation, particularly with respect to something so critically important as our election system, also serves an important purpose.
Lawsuits can be a particularly powerful forum for spreading misleading information. Public officials sometimes won’t speak publicly about pending legal matters, leaving facts in an initial complaint or petition to go unchallenged in public discourse. It can be weeks before a response is filed or a hearing is held, long after a flood of initial headlines repeating the allegations in the suit. By the time a case gets thrown out, it may not get as much attention as the initial filing.
As someone else said, "A lawsuit without provable facts showing a statutory or constitutional violation is just a tweet with a filing fee." But with legalese, lawyer's signatures and a filing stamp, it has the immediate appearance of legitimacy. Good for anyone who is warning Trump's lawyers not to pull this shit again.