MatthTheGeek, this may come as a surprise to you, but "huge" flag does not prevent AI pilot from using a weapon against bombers. In turrets this flag works differently and prevents turret from targeting small ships. For this reason The E implemented a flag called capital+, which works like bomber+ flag.
The fact that Trebuchet has "huge" flag has no meaning other than it can kill corvettes and capitals, unless you equip it on turrets. Only bomber+ flag disallows AI pilot from using it against fighters, but not bombers.
As to why retail AI does not use Trebuchets or Tempests, I do not know. But custom AI can use them likely because of $smart secondary weapon selection in ai_profiles.tbl.