A bee's "corbiculae", or pollen-baskets, are located on its tibiae (midsegments of its legs). The phrase "the bee's knees", meaning "the height of excellence", became popular in the U.S. in the 1920s, along with "the cat's whiskers" (possibly from the use of these in radio crystal sets), "the cat's pajamas" (pyjamas were still new enough to be daring), and similar phrases which made less sense and didn't endure: "the eel's ankle", "the elephant's instep", "the snake's hip". Stories in circulation about the phrase's origin include: "b's and e's", short for "be-alls and end-alls"; and a corruption of "business".
So there you go. Doesn't make much sense, but then again, do I ever?!