Use of render array in theme layer Why does the theme layer uses render arrays when all the theming functionalities can be implemented with print statements in templates files?
Is there any analogy that explains the use of render array in the theme layer and how it interacts with the template files?
Drupals render arrays are a great invention which make it possible to alter the output of content by others (modules, themes etc.).

If you would hard-code your output in variables to print, no one other can alter it. But if you use render arrays, then other modules can implement hooks to alter the rendering of your output if they need to do so.

For this flexibility it is best practice to use render arrays until the very last moment and let the twig template build the html from it.