Why does my iPad shut down, especially when I just turn it on?

When I turn on my ipad(3rd Gen), it doesn't accept my swipe to put in my passcode. Then when it does, it gets frozen and boots off and restarts. The primarily happens when it had been totally shut done and turned on.
I don't know, but if it were me, I'd use iTunes to restore it and set it up as a new device.
My new iPad Pro did this as well not often and the screen flickered sometimes. Never knew what caused this. Was replaced under its warranty.

Original thread: https://forums.imore.com/threads/why-does-my-ipad-shut-down-especially-when-i-just-turn-it-on.370240/