In general, when a loan is obtained to pay expenses the deduction is when payments to the vendors are made, not when the loan is received, and then the later loan repayment is not a deduction (just like the receipt of the loan was not counted in income.)
Presumably the business deducted the payments to the care providers when those payments were made using the loan proceeds and reduced income in that year.
If so, the repayment of the loan is not now a deductible expense since that would be deducting those amounts a second time.
The tax liability was likely a result of income tax on the net profit which was not reduced by the loan repayments.
I hope this helps to understand that loans are not included in income when received nor deducted as expenses when the principal is paid. Interest on the loan is a deduction when paid and is income to the recipient of the interest.
Please ask if you need clarification.