It is a common misconception that officers have quotas to issue a certain amount of tickets per month. The quota is actual for how many traffic stops they make. You'll see behavior like this from cops who haven't met their quota, but it's not about the money.
Maybe not in large cities with some sort of oversight but in small rural towns with only 2 or 3 cops, it helps pay for their jobs and keeps them employed.