My iPhone 5c randomly started to turn off but then turned back on?

I was playing on my iPhone and then it went to the apple logo as if turning off, so inassumed it had died, and I was about to plug it in when it turned back on and my battery was at 86% still. It scared me because I'm a already a bit paranoid as my door randomly opened earlier, so with my iPhone being weird on top of that I'm a bit freaked out, are there any logical reasons on why it did this? I've had the phone for 2 months and it's never done this before

I'm pretty sure It was a auto update

  • My Iphone 4 shut off randomly and won't turn back on? - 1 I've searched the internet and found the same answer: hold the sleep/wake button and the home button at the same time to reset the phone. Now the only bad thing is that my sleep/wake button is broken… So I have no idea what to do. I have the latest iOs update. I don't know maybe it will randomly turn itself back on
  • My laptop randomly shut off and now it won't turn back on? What's wrong with it? Do I have to buy a new one? I'm so confused. P.S. I'm typing this from my iPhone. I took the battery out and now it's working again. Yea! If I put the battery back in though, will it still work?
  • My iPhone turned off by itself and turned back on while using a app? When I was on YouTube my phone just shutted off by itself then turned on. Is there something wrong with the phone. Also when I click my home button one time the phone sometimes wouldnt come on till the second click. What can I do?
  • My iPhone turned off and won't turn back on? I set my phone down while i was on the computer, didn't use it for like 15 minutes, and when i looked at it the screen was black and it shut off. It was on like 80% battery so it didn't die. I tried plugging it in to the charger to see if i could get it to turn back on but it will not turn on. I don't know what happened!