In the 1620s, the word cucaracha was borrowed from Spanish into English to represent beetle-esque household pests. That stuck around for a little bit until some non-Spanish speakers decided that cucaracha was a misspelled combination of two other animal names, cock (chicken) and roach (an old word for a type of fish), so they "fixed" it to the cockroach we know and love today. It really makes no sense but that's what they went with. Cucaracha meant "beetle" in Spanish, and the root there is cuca, which referred to some caterpillar types (and is most likely imitative in origin). Cock is a very simple word that underwent very little change throughout history and is probably also onomatopoeic, while roach traces back to a lineage of Germanic words meaning "fish". Roach as a shortening of cockroach emerged in 1837 and the "end of a marijuana cigarette" definition was first attested in 1938, although that may not be connected
Adam Aleksic, a freshman studying linguistics at Harvard University, has been described as the internet's sixth most famous etymologist. He has disturbing interests in words, vexillology, geography, board games, limericks, and law, and he loves writing about himself in the third person.
The Etymology Nerd