Terrain.png is a texture atlas for every block in the game, it has existed since the very first version in Minecraft but because of this it's cumbersome to replace, add, or remove textures however even thought it was removed from Java edition in 2013 4J never replaced it with the modern system.
https://minecraft.wiki/index.php?title=Terrain.png
In 1.13 Minecraft switched from item IDs to item namespaces which helped in development of never blocks and features because developers did not have to remember each ID they could just read it.