Two stars orbit a common center, accreting gas from a surrounding cloud. Rotating disks of gas form around each star and around the pair as a whole. From these disks, jets shoot out like hoses. Inside the disks, gas is constantly churned — that's the magnetorotational instability at work.
This drains energy from the entire system, and the stars start to move closer. Each orbit, the distance between them shrinks by half a percent. If magnetic fields were absent, the stars would instead recede from each other.
The same mechanism helps pairs of supermassive black holes merge at the centers of galaxies. Previously, it was thought that at distances of a few light-years they stall and cannot close in completely. Magnetic fields solve this problem. They also explain why the Universe is full of tight stellar pairs that almost touch each other.
Each orbit, a stellar pair draws closer by half a percent — as if the Moon approached Earth by 1900 kilometers every month.
In the movie "Interstellar," the black hole Gargantua spins, and its disk glows due to magnetic fields — similar processes, just on a gigantic scale.