Other funny sizes probably come from the thumbnails shown on the file page itself. For example, for this random file:
https://commons.wikimedia.org/wiki/File:Bruxelles_%C3%A0_travers_les_%C3%A2g...
The main big thumbnail is 796×600 pixels, and the small thumbnail under "File history" is 120×90.
Additionally, for every thumbnail, thumbnails with 1.5× and 2× sizes are generated to be used on devices with high-resolution screens.
And additionally, you can set an arbitrary size for any thumbnail used in an article, and MediaWiki will dutifully generate a thumbnail of that size.
As far as I know there is currently no option to disallow generation of thumbnails of arbitrary sizes, and limit it to some preset list.