Boolean Union Weirdness

 From:  RobertH
7127.1 
I needed to cap some cylinders with a dome (half sphere) and so was exploring different techniques to do so, and came across this boolean union strangeness, and want to understand what is going on.

To reproduce, create a cylinder with the length going UP along the z axis. Select the TOP edge. Select Revolve. Click one point on that edge and then another perpendicular to it on the same edge. This creates a sphere. Now union it with the cylinder to "dome" it, creating a single object. This "mostly" works correctly.

Do the same thing on the BOTTOM end of this cylinder. This mostly fails, though not always. Most times the bottom of the cylinder is removed, other times the dome is split, and at times it works. This also happens on the top cylinder, though less often. So what exactly is going on? Unioning two objects should "always" produce the same results, right?