Why is vCenter 5.1u1 exiting hosts from maintenance mode?

I've seen this happen with ESXi 4.1 hosts after a patch accidentally wacked the /tmp/scratch folder. You might want to check if that directory still exists on the hosts that exited maintenance mode automatically.

If they're missing, you'll want to mkdir to create it. Also, you'll want to check if persistent scratch is setup correctly on each host by following this VMware KB article:

VMware KB: Creating a persistent scratch location for ESXi 4.x and 5.x