Her purpose is to show how tough and skilled she is so she can win in November over another Democrat.
I actually think that Dianne has really stepped in it this time and may actually have hurt her re-election. De Leon already has the hard left vote wrapped up. I may be wrong, but I have to think that she has angered many Independents and Republicans whose support she needs to get re-elected. Many of them could leave that portion of their ballot blank. She will probably still win, but it won't be as decisive as her win in the primary.