You know what’s nice about this: Marshmallow puts on the crown and is suddenly in the spotlight, and it makes him happy. Just like with Olaf, Marshmallow was created by Elsa and is an extension of herself. I bet growing up cloistered as she did, part of her truly did long for that opportunity to be exposed to be people in some way. In particular, as queen, she would revered, treated with admiration and respect. But when it all came crashing down, and what she got was fear and anger instead, she is eager to throw away the crown. She wants nothing to bind her to those people if they are only going to give her the negative response she grew up hiding from.
Annnnnnd, Marshmallow does this at the end of the movie, when Elsa has calmed down and [presumably] been restored to the throne. His arc mirrors Elsa’s. At this point she can step up to that position and have it be a positive and rewarding experience. The pressure to rule a kingdom, after a lifetime of isolation, would give her a sense of belonging, that I think would be really good in the end.