The expression ‘the be-all and [the] end-all’, meaning chiefly ‘the central or most important element’ is from Macbeth. Macbeth is contemplating killing Duncan: “…that but this blow/Might be the be-all and the end-all…/…We’d jump the life to come.” (Macbeth, I.vii.4ff)
The phrase ‘the be-all and [the] end-all’ has been popular over the years (usually found without the second ‘the’). Though many people are aware that it is a Shakespearean allusion, it is not as common as, say, ‘to be or not to be’ and it is usually used without any special reference to Shakespeare.
After years of use, ‘the be-all and [the] end-all’ became shortened to 'the Bs and Es’. As this was said, over time (if you repeat this fast, you will see), it sounds like ‘the bee’s knees’.