A very strange binary star system keeps flashing Earth with X-ray flares. Scientists now understand why.