Around the time of World War I, American battery manufacturers, the War Industries Board, and a few government agencies got together to develop some nationally uniform specifications for the size of battery cells, their arrangement in batteries, their minimum performance criteria, and other standards.
In 1924, industry and government representatives met again to figure out a naming system for all those cells and batteries they had just standardized. They decided to base it around the alphabet, dubbing the smallest cells and single-cell batteries “A” and went from there to B, C and D. There was also a "No. 6" battery that was larger than the others and pretty commonly used, so it was grandfathered in without a name change.
As battery technology changed and improved and new sizes of batteries were made, they were added to the naming system. When smaller batteries came along, they were designated AA and AAA. These newer batteries were the right size for the growing consumer electronics industry, so they caught on. C and D batteries also found a niche in medium- and high-drain applications. The mid-size A and B batteries simply didn’t have a market and more or less disappeared in the U.S.
While you typically won’t see either A or B batteries on American store shelves, they’re still out there in the wild. A batteries were used in early-model laptop battery packs and some hobby battery packs. B batteries are still sometimes used in Europe for lanterns and bicycle lamps. According to Energizer, though, their popularity is dwindling there, too, and they might be completely discontinued.