Law vs Breed: why didn't Law use room to remove collars?
It was a filler episode which is not taken from source material (i.e. manga). The fillers are just to extend time for the anime so that it does not catch up to the manga.

This happens in Naruto quite a lot and One Piece has only three filler arcs, so don't think too much about that episode, as it is there only to extend time