Probably the same way sports teams convince communities to build subsidized stadiums: with unrealistic projections about jobs and trickle down benefits.
Bribes. False promises about job creation. Politicians with wrong incentives, being starstruck, or who simply don’t understand what a datacenter is