It's worth remembering that Hezbollah as a whole is more than just the paramilitary branch which is commonly referred to as a terrorist organization. Some entities (like the EU) only considers the paramilitary arm of Hezbollah as a terrorist group, while the rest is a proper political organization.
Like always, things aren't quite as black and white as many want it to be.