Only female mosquitoes bite humans and animals; males feed on flower nectar. Mosquitoes mean nothing personal when they take your blood. Female mosquitoes need protein for their eggs, and must take a blood meal in order to reproduce. Since males don't bear the burden of producing young, they'll avoid you completely and head for the flowers instead. And when not trying to produce eggs, females are happy to stick to nectar, too.
Some mosquitoes don't bite humans, preferring other hosts like amphibians or birds. Not all mosquito species feed on people. Some mosquitoes specialize on other animals, and are no bother to us at all. Culiseta melanura, for example, bites birds almost exclusively, and rarely bites humans.