iPad randomly shutting down can be caused by a variety of factors, including
Software issues A software glitch or bug could be causing your iPad to shut down unexpectedly.
Hardware issues A hardware problem, such as a faulty battery or power button, could also be to blame.
Environmental factors Extreme temperatures, moisture, or other environmental factors can also cause your iPad to shut down.
To troubleshoot the issue, try restarting your iPad, updating your software, or restoring your iPad to factory settings. If the issue persists, you may need to take your iPad to a service center for repairs.