Laws and budgets are set on different time-scales; there is never 100% alignment between the cost of enforcing the law and the availability of the budget required.
In fact, most of the time, there's very little alignment, because there's no incentive to have those things be aligned. Sometimes even disincentive: there are laws on the books nobody wants enforced, and a culture in policing of enforcing the letter of the law, not the spirit—but one can always choose to not enforce a law one doesn't agree with by just making an informal agreement that certain crimes (of basically equal severity) take enforcement priority, such that those crimes nobody sees as crimes just get "de-prioritized" to the point that they're never enforced at all.
In fact, most of the time, there's very little alignment, because there's no incentive to have those things be aligned. Sometimes even disincentive: there are laws on the books nobody wants enforced, and a culture in policing of enforcing the letter of the law, not the spirit—but one can always choose to not enforce a law one doesn't agree with by just making an informal agreement that certain crimes (of basically equal severity) take enforcement priority, such that those crimes nobody sees as crimes just get "de-prioritized" to the point that they're never enforced at all.