The captured debug log can be arbitrary length so it does not make sense to force developers to scroll through their terminal window to find the most useful part of the error. It is best to present it at the end of test result where it is quicker to find (probably on the screen already).
The impact builds like ninja check-functional is negligible since you need to find the failure associated with a specific test. This diff only really impacts running a single test in a development environment, but the impact can be quite large for test failures encountered repeatedly until they are fixed.