I think it is because MNIST is provided as a CSV in which the first column is the label and the other 784 columns are the pixels, while for cifar10 (https://www.kaggle.com/c/cifar-10 9) images and class labels are provided separately.  Of course, you can write your own Dataset loader.