Images should not link to the image file.
You can now automatically unlink images that are linked to themselves:
Many older WordPress installations did this by default, and we've recently seen this on a few new installs by users that don't know better.
Note: this only removes the links on images on the front-end, and doesn't edit your content. The actual link on the image can only be manually removed during a post update.
User experience
Linking an image to itself is a bad user experience.
Users don't expect to be taken to an image file when clicking on an image. Accidentally being taken away from what you're reading is annoying.
80% of pageviews are mobile and images are full width on mobile, which means there's no benefit to opening an image in a standalone page.
Revenue
Ads are not shown on image pages, only on posts. This means that we want to keep people on posts instead of sending them to images.
Search engines
Search engines use links as clues to what's important. Linking to an image tells the search engine the image is important and is something that should be considered a separate page on your website.
In an oversimplified world, if you have a "potato soup" recipe and one of the images is "potato-soup-with-bacon.jpg" but bacon isn't listed on the page, search engines might consider the image more relevant for "potato soup with bacon" than the post and get unsure about which to show. We always want a post to show rather than an image.
In reality, search engines are pretty good about serving the right type of content for the given query so will show a post if relevant, and an image if the user is looking for an image.
However, it's always best to