Paying sheriffs to keep the kids

‘State dollars attached to each juvenile’ would allow sheriffs to build more local juvenile-detention centers, then get paid to keep kids who are placed in state custody. Is the state paying to keep kids closer to home or incentivizing people to put kids in jail?