Why would nicotine be found in a high school chemistry lab?

I can imagine it’s 1940, and the lesson is “look, nicotine is a natural pesticide! Everyone, spray some on your potato bugs”.