UA does some 767 maintenance in GRU, so having one plane on the ground for 12 hours gives them time to do the work.
Also, even if the plane turned right around to head back to the US, it wouldn't get to ORD/IAD until later in the evening, which limits connections, effectively stranding travellers not terminating in ORD/IAD.