My state is similar to
@Kraut783 's AO. The portion of the fine from a traffic ticket that is designated for the municipality that wrote it goes into the general fund. And believe me, it's a small fraction of the fine.
One of the things I really liked about policing in PA is that ticket quotas are straight up illegal. You could go your whole career and never write a mover, and there wasn't anything anyone could do about it. You could stop 500 speeders and give them all warnings unless you were on a special detail like 'click it or ticket'.