Why add .unsqueeze(0) in predict_image?

predict_image:

def predict_image(img, model):
            xb = to_device(img.unsqueeze(0), device)
            yb = model(xb)
            _, preds  = torch.max(yb, dim=1)
            return preds[0].item()

what is the use of unsqueeze when it totally works without it?