Is the Law Just?

According to the book of Acts, when Paul was brought before the King and governor, they found that he wasn’t guilty. Why then, did they not release him from custody?