When to use ob_start() and ob_end_flush()

My point is that it isn’t solving the problem - it is hiding the problem. Their code still contains the logic error that causes the problem just that because they waste time generating the page content and then throwing it away in order to do the redirect they can no longer see the problem and so will probably never fix their code to stop wasting time and resources unnecessarily.

Using a global buffering scheme is the easiest way to hide logic errors in inefficiently written code so that the code appears to work while using far more resources than it really needs.

In most cases simply testing for whatever needs testing in order to decide whether to redirect at the start of the script is the correct fix.

There is nothing wrong with using buffering to allow you to build your page out of its final order (it just isn’t absolutely necessary in simpler applications). Where it is wrong to use buffering is where you waste time building the web page only to throw it away in order to do a redirect that could have been done before you started.