Why does the MRI machine does not rip off its own electronic components
TL;DR
Magnet is made from nonmagnetic materials where there is high field. Anything sensitive, is positioned where the coil design results in a net magnetic field of zero, where it cancels out. If something is very very sensitive to the field, you can put it in a can, which effectively "pushes" the magnetic field out. Where a magnetic field is zero, components cannot be ripped off.

I know that, a very similar construction, a superconducting lab magnet, is made out from nonmagnetic metals,copper, gold are few.

But, more importantly, you wind a magnet such that its field is confined within the donut, but cancels out outside. this is made from the same current, so it is only a geometric problem, how to wind. I am sure that all electronics are out in the safe zone.

If something should absolutely be shielded from a DC magnetic field, one can use a mumetal can to do so.

A special condition, which is called a magnet quench (shivers down the spine) might make protective winding ineffective for an instant.

If the concern is the magnet itself, then I can say that a lot of mechanical engineering goes into some of the strongest magnets in the world such that they don't collapse onto themselves.