They want to keep him because the US government is paying them to keep him.
He has never been convicted of a crime in El Salvador or the US, yet the the Trump administration keeps calling him a criminal over and over as if their claim would make it so. What they are doing is trying to cover up a terrible misstate. He is not an officer nor even a member of R14. ICE's claims about him are based on two interviews by local police. The interviews were contradictive, were double here say, and the prosecution could not present testimony to validate the interviews. Thus the judge threw the evidence out.
Rubio with no evidence other than the ICE claim he was R14 labeled him a terrorist.