Taxpayers cover the cost when someone is found innocent, the guilty pay the fees, not defendants. Incarceration is a much higher expense some of which is covered by tax payers on the agreement that it's worthwhile to keep that person from society as part of their punishment. Many states charge inmates fees. It used to be that inmates worked on projects that helped offset the cost for taxpayers. In many states they ended this as businesses who saw the cheap labor as competition lobbied to end it. I think there was/is a lot of corruption surrounding that. Still, inmates today in many states work other types of jobs to earn money while incarcerated. That's as I understand it, anyway.