The entire war was basically fought under the authorization of the Tonkin Gulf Resolution, which, while it passed by a combined vote of 504 - 2, the members of Congress likely did not envision they were signing off on a nine year war with nearly 60,000 American deaths and hundreds of billions of dollars in expenditures. If they had, they probably would have voted differently.
At the time the War Powers Act passed in 1973, the Vietnam War was very unpopular and elected officials were trying to appear against it as well, even when many of them had already supported it with funding for years.
Korea and Vietnam also set a dangerous precedent we still live with that allows Presidents to engage us in wars without exit strategies without the Constitutional permission of a formal declaration of war, essentially eroding the Legislative Branch's power.
After the war ended, Congress felt that the war had just been pushed through by the various presidents and that the presidents had not consulted with Congress. Congress felt that the presidents were taking away Congress's constitutional right or duty to be the one to declare war.
So the Congress passed this law to try to define how long a president could keep troops in combat without the approval of Congress. They did this to try to get some power back to their branch of government. It is not clear if what they did is constitutional, but the law is still on the books.