question: How/why do butterflies have such an irratic flight pattern?
comment: Sure seems to be a self defense mechanism to avoid predators, namely birds. Birds can change direction on a dime like a butterfly. Still, birds got to eat and the defense is not perfect.
passages: In contrast to the herbivorous diet of the larva, the adult variable checkerspot's main food source is the nectar it obtains from flowers. In Jasper Ridge Biological Preserve in California, an extremely well studied site, the nectar source most frequently used by adult butterflies is "Eriodictyon californicum".
  
  Section::::Diet.:Diet and oviposition.
   Some noctuid moths, such as the large red underwing ("Catocala nupta"), are cryptic at rest, but display a flash of startlingly bright colours when disturbed. Others, such as many species of genus "Speiredonia" and "Spirama", look threatening while at rest. Also saturniid moths of the genera "Attacus" and "Rothschildia" display snake heads, but not from the frontal position.
   Section::::Social behavior.
  
  Section::::Social behavior.:Communal nesting.
   Many tropical butterflies have seasonal forms for dry and wet seasons. These are switched by the hormone ecdysone. The dry-season forms are usually more cryptic, perhaps offering better camouflage when vegetation is scarce. Dark colours in wet-season forms may help to absorb solar radiation.
  
  Butterflies without defences such as toxins or mimicry protect themselves through a flight that is more bumpy and unpredictable than in other species. It is assumed this behavior makes it more difficult for predators to catch them, and is caused by the turbulence created by the small whirlpools formed by the wings during flight.
  
  Section::::In culture.
   The 2012 novel by Barbara Kingsolver, "Flight Behavior", deals with the appearance of a large population in the Appalachians.
  
  Section::::Human interaction.:Captive rearing.
   The variable checkerspot's main predators are birds. Populations of the variable checkerspot, like most lepidopterans, are usually scarcely distributed and thus direct observation of avian predation on butterflies is rare.
   Natural selection in favour of features that deflect predators' attacks is straightforward to explain: variants of patterns that more effectively deflect attack are favoured, since animals with ineffective variants are likely to be killed. Naturalists since Edward B. Poulton in his 1890 book "The Colours of Animals" have noted that butterflies with eyespots or other false head markings can be expected to escape with minor wing damage while the predator gets only "a mouthful of hindwing" instead of an insect meal. In Poulton's words:
  
  A 1981 experiment confirmed the expected correlation between deceptiveness and survival in butterflies.
   Moths usually rest with their wings spread out to their sides. Butterflies frequently fold their wings above their backs when they are perched although they will occasionally "bask" with their wings spread for short periods (several types of Swallowtail butterflies tend to frequently rest with their wings spread when in sunlight). However, some butterflies, like the skippers, may hold their wings either flat, or folded, or even in-between (the so-called "jet plane" position) when perched.
   Some species of butterflies can reach fast speeds, such as the southern dart, which can go as fast as 48.4 km/h. Sphingids are some of the fastest flying insects, some are capable of flying at over 50 km/h (30 mi/h), having a wingspan of 35–150 mm. In some species, sometimes a gliding component to their flight exists. Flight occurs either as hovering, or as forward or backward motion. In butterfly and moth species, such as hawk moths, hovering is important as they need to maintain a certain stability over flowers when feeding on the nectar.
  
  Section::::Behavior.:Flight.:Navigation.
   There has been some controversy about the reality of Lévy flight foraging. Early studies were limited to a small range of movement, and thus the type of motion could not be unequivocally determined; and in 2007 flaws were found in a study of wandering albatrosses which was the first empirical example of such a strategy.
  
  There are however many new studies backing the Lévy flight foraging hypothesis.
   Female availability is an important factor in determining mating systems. Because the breeding period of the variable checkerspot is brief, female availability is limited by time as well as by space. Male butterflies in other species with brief female availability have developed strategies that ensure quick access to fertilizable females, leading to high levels of male harassment. This sexual harassment has led mated females in other species of butterfly to gather in areas of lower male density, since consistent harassment could negatively impact the time females have to search for food sources and lay eggs.
   Chequered skippers are small and because of their size flight is fast and inefficient. When they fly it is almost like they are skipping above the plants. This skipping makes it hard for them to be followed.
  
  Section::::Conservation.
   Flight times for the variable checkerspot vary regionally. Usually, the flight season lasts from April to June in California and Oregon, while it normally takes place from June to July further north and in higher elevations.
  
  Section::::Diet.
  
  The diet of the variable checkerspot changes dramatically with development: the larva has an herbivorous diet consisting entirely of plants while the adult butterfly feeds exclusively on nectar.
  
  Section::::Diet.:Larval diet.
   Adult "P. rapae" use both vision and olfactory cues to identify flowers in their foraging flight. The cabbage butterfly prefers purple, blue and yellow flowers over other floral colors. Some flowers, like "Brassica rapa", have a UV guide for aiding nectar search for the butterfly where the petals reflect near UV light whereas the center of the flower absorbs UV light, creating a visible dark center in the flower when seen in UV condition. This UV guide plays a significant role in "P. rapae" foraging.
   Section::::Behavior.:Flight behavior.
   In addition to the core feedback loop, a second modulatory feedback loop has also been identified in monarchs. This feedback loop is much like the "Drosophila" second feedback loop and includes genes that encode orthologs of VRILLE and PDP1, which are known to regulate CLK transcription in "Drosophila".
  
  Section::::Migratory theory mechanisms.:Time-Compensated sun compass theory.:Bi-directionality of sun compass.
   Section::::Migratory theory mechanisms.:Time-Compensated sun compass theory.:Molecular basis of circadian navigation.
   Nearly all butterflies are diurnal, have relatively bright colours, and hold their wings vertically above their bodies when at rest, unlike the majority of moths which fly by night, are often cryptically coloured (well camouflaged), and either hold their wings flat (touching the surface on which the moth is standing) or fold them closely over their bodies. Some day-flying moths, such as the hummingbird hawk-moth, are exceptions to these rules.
   The diet of the adult butterfly has a large impact on the choice of "D. aurantiacus" as the oviposition site and larval host of the variable checkerspot. Adult butterflies prefer to oviposit on host sites that are close to nectar sources. In the Jasper Ridge site, "D. aurantiacus" is the host plant closest to the "E. californicum" nectar source. This proximity advantage overcomes its nutritional deficiencies compared to other host plants and leads to it being the principle host plant of variable checkerspot butterflies.
  
  Section::::Predation and defense.
   As in many other insects, the lift generated by butterflies is more than can be accounted for by steady-state, non-transitory aerodynamics. Studies using "Vanessa atalanta" in a wind tunnel show that they use a wide variety of aerodynamic mechanisms to generate force. These include wake capture, vortices at the wing edge, rotational mechanisms and the Weis-Fogh 'clap-and-fling' mechanism. Butterflies are able to change from one mode to another rapidly.
  
  Section::::Biology.:Ecology.
  
  Section::::Biology.:Ecology.:Parasitoids, predators, and pathogens.
   Section::::Predation and defense.:Defense strategy.
  
  The variable checkerspot, like many other butterflies, has developed a defense strategy of unpalatability to birds as a means of resisting predation. In a controlled experiment, would-be avian predators often exhibit head-shaking and beak-wiping behavior after killing a variable checkerspot, characteristic of tasting unpalatable prey. The unpleasant taste of the butterfly is likely due to the presence of irisoid glycoside compounds in the scrophulariaceous plants that make up the majority of its larval diet.
  
  Section::::Predation and defense.:Defense strategy.:Iridoid glycosides.
   In light of this new interpretation, it has been speculated that different food plants in different geographical locations influence the palatability of the viceroy. Further investigation is needed to clarify the relationship between the viceroy and its purported models.
  
  Section::::Evolution of viceroy mimicry.
   Section::::Experimental evidence.:Other insects.
  
  Although studies of frequency-dependent foraging in other pollinator groups seems to be rare, at least one study has demonstrated that butterflies prefer to visit common corolla shapes. This observation was based on reduced seed set of rare morphs in field studies.
  
  Section::::Mechanisms.
  
  Section::::Mechanisms.:Positive frequency-dependent foraging.
   On hot days large numbers of these butterflies can be seen mud-puddling on wet sand. "E. core" is an avid mud-puddler often congregating in huge swarms along with other "Euploea" species as well as other danaids.
   Butterflies may also have taken evolutionary advantage of chromostereopsis in developing distinctive "eye" patterns, which are presented on their wings. These eyespots can appear as being forward or receding in depth based on their color pattern, producing an effect of protruding or receding eyes, respectively. Natural selection may have developed these color and texture schemas because it produces the illusion of protruding or receding eyes of much larger organisms than the actual butterfly, keeping potential predators at bay.
  