The intended use of this statement is to enable or disable the output capability of UDFs and external procedures. As such, its targeted use is for diagnostic analysis when you are developing a new UDF or external procedure.
You can also use SET SESSION FUNCTION TRACE for any other trace output that either is not possible, or is inconvenient to perform, using other means.