Every department has a budget. Turnover of cars is accounted for. Agencies have a pretty good idea of how often new cars need to be purchased to replace the aging fleet. City police departments have budgets that are decided by the city. Sheriff offices are decided by the county. State budgets are decided on by state legislature.
If the people in charge of deciding budgets don't want an agency to have it, they won't get it. It doesn't matter how many tickets are written. For example, we haven't had a pay raise in over 10 years with the Colorado State Patrol. Legislature just won't give us the budget needed to fund pay raises. Every year it is number 1 on the agenda, but they won't give it to us. We could write a trillion tickets and generate 100 trillion in revenue, but it won't change a thing. Just keep in mind, every agency doesn't operate the same. There are going to be differences across the country.
Colin