A bill has to pass through both houses of Congress to make it to the president because the Framers of the Constitution wanted to make sure that it was hard for the government to oppress us and hard for it to make bad laws on a whim. Therefore, they put up many obstacles that bills would have to pass to be enacted into law.
If a bill only had to pass through one house of Congress, it would be much easier for bills to be passed. The Framers did not want this to happen. They wanted to make sure that Congress could not just pass bills on the spur of the moment. For example, let us imagine that a bill only had to pass the House of Representatives. Since all seats in the House are voted on every two years, a whole new House could be elected some year with a given agenda. They might all, for example, want to tax the rich heavily or they might all want to cut government spending drastically. The Framers did not want it to be that easy. Therefore, the bill passed by the House would have to go to the Senate. Two-thirds of the Senate would not have just been elected and would not be swept up in the mania felt by the House for their agenda. This could slow a bill down, perhaps until the next election, by which time people might have changed their minds.
Thus, bills have to pass both houses so as to make it harder to pass any bill. This, the Framers felt, would protect us from a government that did things that were oppressive and/or poorly considered.