I think maybe you need to flip the question on its head and answer it that way. I cannot think of a generic "requirement" which would require that you write hand coded scripts within your section.
Usually this approach or solution would come about organically to solve a specific business requirement when OOTB solutions are not available. This is similar to when you need to hand code your own controls when the OOTB ones available do not meet your needs.
Placing such a script would localize the inclusion of your code to where it is relevant and needed, as opposed to including it somewhere globally where it might be included unnecessarily.