The incentives offset the capital expenses of the move. After allowing recovery for those (usually over about 10 years), the company pays taxes at the usual local rates (which are still lower than up north), for a win-win situation.
Further, new businesses do new business with local businesses, plus attract new residents, who contribute new income to the community and generate new sales taxes, new property taxes, etc.
Even more win-win.
Obviously, this simple equation is not understood in blue cities and blue states -- who respond by bitching about the South "poaching" businesses, rather than adopting productive policies.