Beyond itching in response to infestations, many insects such as mosquitos cause itching that typically lasts a few days. This is caused, in part, by histamine but also likely by other unknown substances triggered by the saliva in mosquitos.
Why do we mount such responses to insects? In addition to triggering a mechanical reflex as with infestations, it is likely that this is a more subtle way in which we can sense undesirable elements around us. For example, mosquitos harbor a host of undesirable insect-borne pathogens such as malaria, West Nile virus, Zika virus, etc. Thus, beyond an acutely aversive signal such as a bee sting, itching is a more moderately undesirable signal to tell us to avoid a certain area.
Itch is a sensation that many people experience yet don’t understand. The philosopher Aristotle (384-322 BC) recorded one of the first known descriptions of itch, characterizing how animals scratch themselves in a manner similar to modern humans.