"Locust" comes from the Latin locusta, meaning both "locust" (the insect) and "lobster". By analogy with a Levantine use of the Greek word for the insect, akris, for the pods of the carob tree, which supposedly resembled it, the pod-bearing North American tree started to be called "locust" in the 1630s.1
Harper, Douglas (ed.). "locust (n.2)". Online Etymology Dictionary. Retrieved 24 March 2021. https://www.etymonline.com/word/locust#etymonline_v_12381 ↩