It’s not free, the cost is built into your monthly payment. This is how all carrier supplied phones are funded. If they allowed you to bring your own unlocked device they could charge you less. They wouldn’t, but they could because they wouldn’t need to recoup the hardware expense.