I am confused about pygame.init() which needs to be run manually to start working in pygame. However, since it is crucial to run anything, why would this not be run by default?
The best way to think about why pygame.init() is relevant is how pygame works: Pygame relies on a library called SDL2 (Simple DirectMedia Layer 2) to display images. Hence, whenever you start pygame it needs to start up quite a few things in the background. Since this can be unnecessary at times pygame gives you control over it.
For a beginner, this might not be terribly obvious but you don't necessarily have to call pygame.init() and you could instead initiate the modules you want individually. For example, if you wanted to only initialise the font module you would replace pygame.init() with pygame.font.init(). You don't see this often in tutorials because most pygame ones are for beginners and pygame.init() is used to keep things simple.
I guess 2 examples to illustrate why this can be useful:
Example 1 - You want to display data with pygame and don't need text or sound
Example 2 - You have pygame code over multiple files, let's say a file with the main code and another file with the sprite of the main character. You would only need to call pygame.init() on the main file and not on the sprite file, thus reducing the processing time.
why does pygame not run pygame.init() by default?