This is because interest expense is tax deductible. Any new debt raised to buy the company will result in more interest expense, which will reduce tax expense.
Therefore, the true cost of debt is the after-tax of debt, which is equal to the pre-tax cost of debt x (1-tax rate).