That was kind of the point, by your logic every creature has a purpose, what is a mosquitoes purpose?
I'm not sure. Plenty of people believe that flies and mosquitos were created by Satan via gene splicing. This is certainly one possibility. Nasty creatures. Doesn't seem like something God would create.