"A word to the wise" is a term used to say that one is about to give someone advice or a warning. The question word "why" often proceeds the word "because". The joke is centered on the phrase "a word to the wise" with "whys" replacing "wise" since they are homophones. 
' Because ' is a word to the whys .