Because in reality they don't actually bring in any revenue for the first few years thanks to all the subsidies and tax breaks they demand upfront before construction. At best it would be state and federal taxes used for operations that any operating business brings like federal payroll, but there wouldn't be any property taxes for at least five to ten years and the federal corporate income tax would likely be from the state the company is based in rather than the state the datacenter is based in. The municipality, be that the county or city the datacenter's in, gets screwed.
Meanwhile just to run a trucking depot you'd have the heavy vehicle tax, international fuel agreement tax, registration tax, sales taxes for the trucks and trailers, property taxes, and whatever incidental taxes required by the state you're operating in. The property tax, IFAT, and local payroll taxes meanwhile all go to the municipality and don't skip straight up to the state or national level. This is with no expectation of any of this being waived or delayed because the trucking industry doesn't have the surface visible financial performance of the industries municipalities are more lenient towards.