Yes because shuffling allows your model to learn about all classes within a batch.
For example, if shuffle = False your first initial batches could only be composed of one class:
0,0,0,0,0,0,0,0,0,0,0,0,0…
In this scenario your model is learning how to predict class 0 very well until it hits the first non-0 class. By then, the loss is massive.
When shuffle = True, your classes are randomly distributed:
0,2,4,1,2,4,0,0,3,1,2,3,5…
So your model learns a little bit about everything. There’s no class it never seen before.