These are called collective nouns:
A noun that denotes a group of individuals (e.g., assembly, family, crew).
oxford dictionaries
They don't all sound this weird:
a group of cows is called a herd,
a group of lions is called a pride,
and a group of ants is called a colony.
enchantedlearning
They aren't just for animals. Weird or not my favorite one is a scourge of vampires.
Asking for the methodology for naming collective nouns is like asking for the methodology for naming nouns. What methodology gave us the word cat? Any particular collective noun may have an etymology one could discover but the methodology really just comes down to useage. Those that didn't catch on didn't get used and so sound weird to us when they're discovered.
Some that sound weird aren't even animals:
a stack of librarians
a groove of DJs
oxford dictionaries