A third aspect is the frame material: when the frame is aluminium the stay is not allowed to give in at all, otherwise it will always break.
Your example is not only ali but appears to be clumsily welded, raising a stress point where, as we can see, the ali didn't flex but parted.
On the question about the Pinion gearbox, which mounts at the bottom bracket, resolving its torque would be considered in the design of the single-purpose frame, as George says, but it seems likely to be a lesser problem as long as the frame is built of steel, because the triangle in which the Pinion mounts is of larger area so that it will flex before it shears off, and the tubes are in any event of larger diameter there, plus there is another stiff triangle of the chainstay and seatstay bracing one side of it, so multiple paths to resolution.
However, it is important to understand a confounding factor that doesn't arise often in bicycles, which is that multiple force-resolving paths must not resolve unequally or the weaker path will break sooner or later. (Actually the possibility is there all the time in bicycles, but not often
discussed because most bicycles are built of off-the-shelf tubes of diameters and wall thicknesses long, long since settled by trial and error in steel and just copied in ali by analogy and due regard for the different characteristics of ali; ditto in plastic bikes.)
That broken bike looks like a conversion to Rohloff and in addition one which in its original derailleur incarnation used rim brakes. I don't believe a commercially made bike would be that incompetently designed without a brace between the stays on the disc side. It may be that the incompetent welding referred to above was an aftermarket job to fit the Rohloff and disc brake, and besides adding a stress-raiser furthermore embrittled the ali by careless heating/cooling procedures. In short, a breakage waiting to happen.
On the 8th page of this PDF photo essay of one of my bikes you can see a close-up of how a disc brace can be turned into a decorative feature; it's the curve with the holes punched into it.
http://coolmainpress.com/AndreJute'sUtopiaKranich.pdfNotice that this was done on a bike where the rear triangle was already tremendously strong in three dimensions because all those stays are differently angled. I don't run disc brakes on my everyday bike because a) I hate the on-off suddenness and dead feel of the discs on my other bikes, and b) I already have disc brakes on my fave bike, but they're a rim-size disc, Magura's hydraulic rim brakes and c) I really prefer the smooth progressiveness of the Magura hydraulic rim brakes. But, if for some reason I had to fit normal discs, I'd have no hesitation fitting them to this bike. On that broken bike in the photo up the thread -- nah, I'd take one look at it, flick my fingernail against it to be sure it sounds like what it looks like, ali, and nix it as mad, bad and dangerous to ride on.
Can a steel frame be broken or the material to wear out in time from the rohloff torque or this is only on alloy frames ?
I believe a steel bike would have stood up better to the same mistreatment, probably much better. Steel can take a lot more abuse than even properly-scaled and processed ali can. Normally this wouldn't matter with a properly designed ali bike (most of us would reject an ali bike, if we do, for other reasons, for instance its dead feel) but here we're discussing an ali bike that appears to have been recklessly messed about. The pictured bike might have survived either the Rohloff or the disc brake, but both at the same time was simply a torque load too far.