Confused about image sizes generated by WordPress

It costs very little to generate as many images as you can imagine as long as the server do not time out when you upload them, which is why wordpress does it. Cost of disk space is very low therefor there is very little point in trying to optimize for it.

Generating images on the fly only when needed, which might sound as a better approch turns out to be more complex on the software side and in the past when it was badly implemented it also created security holes. This do not mean that it is impossible to implement, just that the current implementation is thought of as good enough and there is not a big enough percived “gain” to do the extra effort to implement it.

As for the number of images, in addition to the wordpress core sizes which are intended towards inclusion of images in the content, each theme (and rarely plugins) can also specify that they need specific image sizes to be generated and this is why you get so many images.

As for “generated images are not used”, this is a bold claim which is hard to prove. For sure they are used in the admin, and even if you have some plugin which manipulates images before they are served to the user, unless you know exactly how it works it might use the already generated images for that.