I mean, they lost Transylvania, Croatia and Slovakia which was about 50% of their territory while they had done, seemingly, nothing. Why was this?
You do realize that Hungary, as one of the main constituent parts of the Hapsburg Monarchy, lost the war, right? They had very clearly not "done, seemingly, nothing" - they lost the war. Regardless of whether the Allies blamed the war on Germany, the Hungarians fought on the side of the loser. Excepting perhaps genocide, losing is, quite literally, the worst thing a country can do in war, at least from the perspective of the state itself.
One of the defining characteristics the victorious allies hoped to impart upon the post-war settlement was the notion of "national self-determination", that is each national group should be able to determine its own future. While that's a complicated concept to actually work out and it was not evenly applied across the continent, the peace negotiators in Paris (where the Treaty of Trianon was negotiated and signed) decided the best way to affect this was to place ethnic groups into their own nation-states. This wasn't always entirely possible (to wit: Yugoslavia and Czechoslovakia), but in the case of Hungary, that's what was attempted. Have a look at this ethnographic map of the pre-war Kingdom of Hungary (although not including Croatia-Slavonia) based on the 1910 census (which is more or less consistent with a similar map based on the 1880 census). You'll notice the post-war borders also drawn in on the 1910-based map, and you'll no doubt notice that inside the post-war borders, the population is clearly majority Magyar. Outside the post-war borders, the population is clearly majority something else, depending on location. Obviously, this wasn't a perfect system - it left lots of Hungarians as ethnic minorities in newly independent nations with non-Magyar majorities. But those are the main reasons for Hungary losing so much of its territory: they lost and national self-determination.