Being pulled from the muddy pit saves the prophet's life, but it does not grant him complete freedom. Instead of being fully released, he remains confined to the courtyard of the guard. This ongoing detention is a direct result of his firm refusal to take back his words or change his prophecies in any way.
The king's officers cannot stand his message and want to take revenge against him. To stop him from freely walking through the city streets and continuing to prophesy, they restrict his movement. However, because the king gives a clear order to rescue him from the pit, the officers have no choice but to bring him up. Unable to leave him to die, they are forced to settle for keeping him locked away in the courtyard.