Because when the world has loaded in minecraft, the player immediately joins and renders the world before the resources/textures are loaded from the custom resources.zip
This allows the player to see the default textures for items in their hotbar, or blocks in the world, which could look horrible, depending on the pack used and reveals underlying implementation of certain aspects in custom maps.
I highly suggest fixing this as it would make the game much smoother. Probably load the resources before making the player join the world, is better. As well as when the player leaves the world, they should also unload the custom resources before the menu is shown.
One issue would be when leaving servers, players would freeze when they join and their resourcepack is loading. But the same would happen when they left in the 'fix'. But that's just speculation.
*Note: A side effect, which is related, is that the file_read/write_lock on resources.zip is still in possession of minecraft, which doesn't allow any other prorgam or user to edit the resources.zip when you exit to the main menu. You need to fully exit the program to change the resources.zip.
How to reproduce
- Create a world with a custom resources.zip. I suggest retexturing a diamond and holding it in your hand when you log off.
- Join this world once the resources.zip is inside the folder.
- After the world has finished loading, the resources are loaded, but at this point you can clearly see the world with unapplied textures.
- **World loads, then the mojang logo immediately pops up to load resources.
- The transition to the game shows no leaked default textures and everything is smooth.
- World loads.
- Loading bar pops up, but the background is transparent, therefore you can see the deefault textures shown.
- The resources reload and the textures are applied.