The current MediaWiki behavior, when requesting a thumbnail directly (i.e. by constructing a thumbnail URL, not via the API) is as follows:
* if the size is smaller than the original image size, the thumbnail is served (assuming the wiki is configured to resize images of that type at all)
* if the size is larger than the original, a HTTP 500 is returned (except for vector images, where "original size" is a pretty vague concept)
* if the size equals the original, and the thumbnail would be significantly different from the original (more specifically, when mustRender() returns true for that file - e.g. files with EXIF rotations, or files which need to be converted to a different format for browser compatibility), the thumbnail is served
* if the size equals the original, and the thumbnail would be essentially the same as the original, a HTTP 500 is returned.
The last step is presumably done to avoid wasting storage space on thumbnails when the original file would be just as good (which might or might not be a good idea, see T67383), but it is very confusing from a client point of view and makes it hard to construct a reliable thumbnail URL without having very detailed knowledge of the file. (The API can always be used to retrieve the correct URL, but that has a nontrivial time overhead.) See T70320 for an example of problems caused by this.
A better solution would be to return a HTTP 302 to the original file instead, so that the original is still used instead of a superfluous thumbnail when possible, but requests which do not need to fail don't.