This is why school is so important.
You mean they aren’t insects? Bug is a term with no biological meaning. It can apply to insects, spiders, worms, germs, prions, internet viruses, etc. Plenty of bug sprays are effective against spiders.
Actually there is a group of insects that are ‘true bugs’ these include things like shield bugs and aphids I believe (although I may be a little off,
?) , and while spiders are invertebrates, they are not insects. Many ‘bug’ sprays are effective against them because of the similarities that all land dwelling invertebrates have, but I think the joke was about the common misidentification of spiders as bugs or insects.
The technical definition of bug is insects in the order Hemiptera (and in the suborder Heteroptera)*. These are “true bugs”, which include stink bugs and other shield bugs (Pentatomidae), water striders (Gerridae), water boatmen (Corixidae), back-swimmers (Notonectidae), assassin bugs (Reduviidae), ornate lace bugs (Tingidae), plant bugs (Miridae), the ever-exciting bed bugs (Cimicidae) and a bunch of other neat insects!
That being said, I have met plenty of entomologists who use the word “bug” and even “insect” in the broader, colloquial sense of terrestrial arthropods. The broadest definition of “bug” I’ve run across is terrestrial arthropods + gastropods + annelids + nematodes. The Entomological Society of America welcomes folks who study arachnids, gastropods, annelids and nematodes because these organisms are more similar to insects in habitus than they are to other animals. Either way, spiders aren’t technically insects (or true bugs)!
*Hemiptera used to be “true bugs” by itself, but recent taxonomic revision has combined Hemiptera and the ex-order Homoptera (aphids, scale insects, leafhoppers, cicadas, etc). What was Hemiptera is now Hemiptera suborder Heteroptera. Aphids aren’t technically “bugs”