This is why I used dog photos to illustrate virtually ALL of my Medium stories for almost a year. Medium got so used to the fact that I illustrated everything with a dog photo that whatever I typed into the photo search engine, they' started including a bunch of dog photos.
And you're right -- whether or not the photo has anything to do with the post itself makes no difference.