I think that these two unintended shutdowns aren't enough to have your hardware sent to a repair center, especially when this happened twice in a row out of sudden. If this issue persists in the coming days, it would be a good time to set up a repair.
It could be possible to accidentally hold the power button down without noticing it at all, or the battery not properly staying in its place. Or perhaps even that the hardware itself is defective in a similar fashion to my old Japanese Ice White 3DS is by causing occasional freezes in some of the loading sections of Animal Crossing: New Leaf. But then again, I don't know what's actually causing your New 3DS to randomly shutdown.