Order of input data does matter for neural network training.
In general, Classificaion data have data ordered class wise and hence, if you are training without shuffling the dataset, then your full batch contains only one set of examples and network only learns for the particular class and does overfits for the current class. Then sequential learning of second class follows and learning is not tuned to second class.
Note that, Neural network is nothing but an approximation function and hence, more varied example it seems, more it generalizes; hence it is important to shuffle and feed images of different classes and not same class examples in sequence.