Dickens is being humorous or at least ironic. The Marshalsea is a debtors' prison. The idea was that a debtor could be imprisoned there until his debts were repaid. Their families might help support then, and this is what Little Dorrit does, visiting every day. In the story, the prison has clear class divisions, and those with the most family support might find relatives able to supply the funds for better accommodation and bring in better food .... and alcoholic drink. So a kind of distorted version of 'normal life' could surface within the walls. Dorrit has achieve the status of 'father' of the prison in the sense of the longest serving inmate, and expects all sorts of privileges and respect. Something like social occasions like the one described here could take place. But, Dickens is saying, despite the drinking and singing sentimental songs about far away open spaces as if they were all free to travel about, they are locked in a prison. Dickens chooses this vivid way of making that point: the Marshal of the Marshalsea "knew better" because he had the singer locked securely ("hard and fast") in the prison.