思いも設ける omoi mo ukeru -- to expect, to anticipate
思いもかけない omoi mo kakenai -- contrary to expectations, unforeseen
思いもよらない omoi mo yoranai -- unexpected, unforeseen
The root of "yoranai" is 寄る (yoru), which means "to visit, to drop in". So, 思いもよらない means that the thought of it hasn't even dawned on you.
The root of "kakenai" 掛ける (kakeru), means to hang [a picture frame], to expend [time, money], etc. So, literally, it can mean "it hasn't even taken a thought".