To be strictly (and admittedly boringly) accurate, those numbers are actually the bead seat diameters -- the diameter of the bit of the rim where the tyre beads sit in use -- rather than the rim outer diameter, which is a little bit bigger.
26in is the outside diameter of a 2.1in cruiser tyre as used on the original clunkers, which is where the name comes from. Most "26in" tyres in common use are nowhere near 26in in diameter -- I have some 26x2.4in ones that are over 27in
Similarly, 650B tyres aren't always 27.5in, which is a number chosen because it's halfway between 26 and 29 rather than having any particular bearing in reality. As Paul's numbers show, 650B isn't halfway between 26 and 29 -- put a 2.2in tyre on all three rim sizes and the 650B is closer to 26 than 29.
29in wheels are often quite close to 29in, though