Instead of 'flatten', think 'gather up', as in 'gather up all of the attributes in the object (class) that will be used in the template'.
The gain is 'encapsulation' as the caller does not need to worry about the nature of the class instantiated object it is asking to render itself. Thus you're asking a block to render itself and give you the markup. It just happens that this process is a bit more exposed as a two step process of gathering the data and then processing the template with that data to produce the markup to be outputted.
This is all OO, meaning that now you can self contain re-usable classes and not have to re-invent the wheel. It can also have templates with 'partials', so templates containing templates, which is why I suspect that the 'export_for_template' is there as it facilitates the construction of one context containing nested contexts of the 'partials' and then generated in one single 'render' operation.
I hope this helps,