Thanks for the clarification.
I guess it might be just a mix-up with the class indices.
In your 2nd scenario, your model is only trained on one class, which means it will output only class0. Since your validation data contains human and cat classes, your accuracy will be 50% if you have a balanced dataset.
In your 3rd scenario, it looks like you only have one single class in your validation dataset, which corresponds to class0.
Since your training data only consists of one class, your model just outputs class0 for every sample it gets, which will yield an accuracy of 100% regardless of the actual class in your validation set.