Hi irl hope all is well! I agree with @mckennabrown points, and would add that the model hasn’t really learned to recognise cats and dogs but the relationship between the images and their labels of cats and dogs.
This means that if you pass it any image it uses the relationship/model to calculate which class the picture fits best.
This makes an interesting game one can play, which is before processing the image which the model is not trained for, you can try to guess what the classifier will predict.
There is a post somewhere on this forum where some people use an algorithm to change just one pixel in a image, which then changes the class the model predicts for that image.
There are also various posts and notebook 6 that contain techniques for reducing the chances of this happening.
Heres one such link How to make a classifier identify whether or not something fits into a category?
Cheers mrfabulous1