Category 1: bug types
This is the easiest to explain in terms of why these Pokemon get the move, although I'm not sure why only these bug types get the move specifically


(not a bug type but evolves from one)


Category 2: grass types
My main theory for this category is that these Pokemon lure in bugs to use them to attack the target. This fits pretty well for the Vileplume line and the Victreebel line. with Vileplume being based on the Rafflesia which attracts flies to serve as Pollinators by mimicking the smell of rotting meat (source
https://www.harvardmagazine.com/2017/03/colossal-blossom), and Victreebel has multiple Pokedex entries about it luring in it's prey.
Lures prey with the sweet aroma of honey. Swallowed whole, the prey is dissolved in a day, bones and all. Pokedex entry from Pokemon Let's Go Pikachu and Eevee.

(These two are based on Crinoids not plants so they might not count)

Bramblin and Brambleghast
Category 2.5: non grass types that can lure in bugs

(considering that Banette was a doll that was thrown away, it might be dirty or covered with some trash)

(it might be a reference to mummies in fiction attacking with swarms of bugs)

(bugs might live inside their bodies)

(it costume could be made of garbage it found)

(Dusclops could be based on mummies)
Category 3: invasive species/species that could cause a infestation
These Pokemon are based on species that are invasive species or can rapidly grow a large population to create an infestation and cause problems. This may be the critera they used to select what bug types got the move.
Bramblin and Brambleghast

(these Pokemon could be inspired by microbes, which can grow rapidly)

Tentacruel has a Pokemon entry about it having large outbreaks that likely have a negative impact on the environment
Although these Pokémon are rare, when a large outbreak of them occurs, all fish Pokémon disappear from the surrounding sea. From Pokemon Moon.
The other Pokemon
Some of these may have the move because they are part of one of these categories.
These Pokemon could be in category 3, but I'm not sure about it.

(can your house getting haunted be considered an infestation?)

(it can learn every tm)

(it is a group of many Pokemon so infestation could be members of the group splitting from Stakataka to attack)

(it is 108 spirits bound to a keystone, so maybe some of the spirits split off to attack. But I'm not sure if they could do that considering that they are bound to the keystone)

(Drakloak and Dragapult could be using Dreepy for the attack, but this doesn't really solve the mystery of how Dreepy can use the attack. Maybe it is in category 3)

(I have no clue)