Astronomers call this "eruptive mass loss," and it's a stellar drama we're still trying to fully grasp.
Why do some stars become 'supernova impostors'? Astronomers still don't quite know
Source: space
Source Link: https://www.space.com/astronomy/stars/why-do-some-stars-become-supernova-impostors-astronomers-still-dont-quite-know