Why did Ya’acov let his favorite wife lie by the wayside, instead of carrying her at least into the city of Beitlechem, which was nearby? According to Ramban, the reason why Ya’acov didn’t bury Rachel in the Cave of Machpelah was in order that he should not be buried together with two sisters, for Torah law forbids marrying two sisters. Since Leah was his first wife, she was buried with Ya’acov, despite the fact that Rachel was his first love. Rashi explains the deeper reason why Rachel had to be buried by the wayside. Ya’acov buried her there by the command of G-d, so that Rachel would help her children in future times when Nebuzaradan would drive them into captivity. When the Jews were to pass along the road, Rachel would come forth from her grave and stand by her tomb weeping and beseeching mercy for her children:
Thus says Hashem, A voice was heard in Ramah, lamentation and bitter weeping, Rachel weeping for her children, she refused to be comforted for her children, because they are not. Thus says Hashem, Keep your voice from weeping and your eyes from tears; for your deed shall be rewarded says Hashem; and they shall come back again from the land of the enemy. There is hope for your future, says Hashem, that your children shall come back again to their own border (Yirmeyahu 31:14–16).