In Pennsylvania, more than half of the fees on tickets I have seen go directly to charity or similar (government) funds, if I remember correctly. This is the right strategy.
I don't have the information on traffic fees, but there's strong evidence that lottery fees are supposed to go to charity but get put in general state funds instead: https://www.youtube.com/watch?v=9PK-netuhHA