But doing a lot of these operations on-server makes sense when there's a significant volume of highly parallelizable transformations which need to be done on the data before it's usable.
Of course the best solution is likely to be a happy medium between the two, where simple low-level transformations are done on-server and the rest of the data preparation is done as the data is transferred to the client.
It was so hard to debug, so hard to safely maintain these procs, and a general nightmare
Tightly coupling a lot of the application-specific compute in with how the day is stored and accessed says you up for even more difficulties when you need to debug, scale, migrate storage/compute or evolve your application faster or more radically than your data organisation.
OTOH, if you can pre-process the data (or shards) in the server (or servers), you won't need to move it across the network for processing.
Hard problems are hard and one of the reasons databases outlive their systems and developers is because moving that data is a Royal Pain.
Plotting a Mandelbrot on the Mac would take a lot longer, even in C, than just making the printer do it.
Usually overnight, because the program took a couple hours to run most of the time.