So I understand the Austro-hungarian empire being broken up to punish Austria. But wasn't Hungary forced into the war on account of being the 'lesser member' in the union?
Why wasn't Hungary just free'd from Austria and allowed to keep the majority of its territory?
Well, the answer to this is extremely complicated with hugely differing viewpoints based on who you talk to. I wrote an essay on this not too long ago, so I'll do my best to explain. Also, I'm am a Hungarian living in Canada, so be aware that my explanation may be slightly biased (although I use mostly English sources).
First of all, you need to understand Hungary's situation right before the war. It had recently become 'independent' within the empire (1867), and was experiencing a Golden Age of sorts. Hungary had been occupied in some shape or form since the invasion by the Ottomans in the early 1500s. While it is true that Austria-Hungary was not nearly as industrialized as many of the other Great Powers, its GDP was the fastest growing pre-WWI, as the vast eastern areas of the empire were industrializing. So now we've established that before the war, Hungary was experiencing strong economic growth, as well as a national revival.
Now the main reason that Trianon happened at all, was due to the plethora of ethnic groups located within the Greater Kingdom of Hungary. According to the 1910 census, only 54% of the Kingdom was actually Hungarian (although they made up a slim majority). In the north were the Slovaks, in the east the Romanians, in the south were the Serbians, and scattered throughout the Kingdom were Swabians. In 1868, the Kingdom of Croatia-Slavonia became independent within the Kingdom of Hungary, so those ethnicities aren't included. Some of these peoples had lived in the Carpathian basin since before the Hungarians arrived, while others migrated there over the centuries. While minority groups had equal rights in theory, in reality many communities took it upon themselves to "magyarize" non-Hungarians, which the government did not adequately object to. Thus by WWI, there was plenty of ethnic tension between the Slovaks, Romanians, Serbs and the Hungarians.
Now on to the actual war. The Hungarian government under prime minister Istvan Tisza opposed the war, as the Hungarian state stood to gain nothing from it (also, Franz Ferdinand was quite anti-Hungarian). After the Austrians, Hungarians made up the second largest ethnic group in the army (almost 1/4).
Despite no enemy forces ever getting beyond the Carpathian mountains, Hungary surrendered along with Austria in 1918. After hostilities ended, the Habsburg monarch Charles IV abdicated, and socialists took power in Hungary. One of their first acts was to disarm the military.
This was to prove fatal for the Hungarians, as all of the non-Hungarian ethnicities rose up in revolt. Despite some success against the Czechoslovak forces, the Hungarian 'Red' army was defeated by the Romanian army, and Budapest was sacked.
While all this was happening, the Paris Peace Conference was taking place, where the 'Big Four' (Great Britain, U.S.A., France and Italy) were drawing up Europe's new borders. The Great Powers were generally apathetic to the situation of Hungary (with the exception of the French, who harboured a hatred for the Hungarians), and they had promised these ethnic groups independence in return for help during the war. The Hungarian delegation showed this map which shows the distribution of Hungarians in the country. Other than some reservations on the part of the British, nothing was changed, and the Treaty of Trianon partitioned the country.
tl;dr: The Kingdom of Hungary was a multiethnic nation, and the Allies promised the other ethnicities independence in return for help during the war while not taking into account the actual ethnic distribution of the region.
Sources:
The War That Ended Peace - Margaret Macmillan,
Paris 1919 - Margaret Macmillan,
Magyar Sorsfordulok - Romsics Ignac
Hungary was not really a 'lesser member' of the austro-hungarian empire, but since 1867 it was with equal status with Austria. The empire-kingdom as a whole went to war and as a whole was punished by the peace treaties. It was a bit like Scotland into the UK, or say Texas in the US. A degree of autonomy and independence movements notwithstanding, they participate actively into the country affairs.
Besides, the dismemberment of the Habsburg monarchy was not a plan of the Entente, which wanted 'just' to cut out of it some territories, not to overthrow rulers. Revolts and revolutions though changed all, but the allies kept asking war reparation and the like to the states heirs of the habsburg governments, the republic of Austria and the State of Hungary.