That seems to have been caused by a rotating lateral force on the shaft, causing a fatigue failure that propagated inward. It is either due to misalignment between the two ends of the shaft, or a design fault (too much overhang from the pulley to the shaft's support bearing). That may be why the broken shaft has jumped to one side after failure. If you don't fix the cause, it will happen again eventually.

Can you give us the model number? It's a great picture of the broken part, but unless someone recognises the model, it doesn't help us work out how it comes to pieces. And that shaft looks round, not square, in the picture, so I must be missing something.