The Daas Zekeinim answers that since they were not commanded to follow the Torah, even though they knew it through Divine inspiration [ruach hakodesh], whatever they wanted to do they fulfilled and whatever they did not want to do they set aside.
Yet when it says in Gemara [tractate Pesachim 119b] that ‘in the World to Come at the Feast of the Righteous Yaakov will be given the cup of wine to lead the Grace after the Meal (bircas hamazon) but he will refuse it because he married two sister,’ this implies that it was an inappropriate thing to do. So why did he marry them?
The Daas Zekeinim say that one can answer that despite it not being forbidden at the time, never the less, since the Torah declared it forbidden in the future, he deserved a slight punishment. And despite knowing that he would receive a slight punishment for marrying them, he did so because he only wanted to marry righteous women and he was unable to find, in that generation, women as righteous as them. To marry one (just Leah or Rochel) would have been impossible, because one woman could not have given birth to all twelve tribes. (Click here for Hebrew text.)
If so, something is not right here. If it was deserving of punishment, why did Yaakov marry two sisters? And if they were the ones he was supposed to marry, because they were the best candidates, why was he even slightly punished?
We must conclude, then, that not everything is black or white; rather, many things in life are shades of gray. It is possible that Yaakov had to marry two sisters even if the Torah said that it was forbidden to do so, and that there would be automatic consequences to him, which would, to some degree, effects the whole entire world. It was still the right decision to make, as there was no one else in the world befitting to marry.
After the Torah was given to the Jews on Har Sinai [Mount Sinai] the mitzvos inside were no longer voluntary. However we can still learn a tremendous lesson; that one cannot assume every situation in life is black or white. We have to acknowledge there are many shades of gray. It is very likely that we won’t be able to make some decisions on our own, especially tough ones. But that is why it isimportant to seek advice, especially from a Torah authority, who has a stronger understanding of the intricacies of right and wrong.