Some communities with reputations as speed traps have a disproportionately large number of their local workforce involved in law enforcement or judiciary occupations.
In some small towns and counties, traffic fines make up a large fraction of the income of the local government, which gives the police an incentive to write tickets. In the state of Texas this conflict of interest was severe enough so that the state legislature passed a law limiting the fraction of revenue that a local government could derive from traffic tickets.