Why does my phone occasionally show the boot animation?
This is a crash and restart of the android runtime, without a crash and reboot of the underlying linux operating system kernel.   The uptime refers to the underlying linux, so it is maintained across the framework restart.

The difference between a framework crash and restart vs. a kernel crash and reboot is not very apparent to the end user, since there's no visual console while the gui is down; from a debugging perspective though they are very different and imply bugs in different parts of the system.

For point of comparison, if you connect to a device by adb (and I think this even works on a secured, ie not rooted one), you can cause a framework restart by typing

stop ; start


and a reboot by typing

reboot


You may or may not see any difference in sequence of splash screens, though the framework restart may be a little faster than a reboot.