I'm sure this was a devastating blow for an elderly man who implicitly had no other friends or any unestranged family.
Not every shelter operates this way. Some are no-kill. But in this case it’s just wrong if the guy’s in jail there is no way for him to even try to get the dog back before the time period is up.