Animals are most likely to become fearful of a specific place or of a person wearing a certain type of clothing associated with a painful or scary experience. It would be very detrimental for milk production if a cow becomes afraid of the milking parlor. It is essential that a heifer's first experience in the milking parlor is a good experience. First experiences make a big impression on animals. If a heifer falls down or is shocked with an electric prod the first time she enters the parlor she may develop a fear memory that is associated with the parlor.
Research done with rats shows the powerful effects of forming a fear memory.
Rats were placed in a maze and allowed to explore all the alleys. If a rat was given a shock the first time it entered a new alley it would never enter that alley again. However, if the rat entered the alley several times and found food, that provided a positive memory. If it received a shock after the fifth time it entered, and still received food, the rat would be likely to continue to enter the alley. If an animal has a painful or scary experience the first time it enters a new place, then the fear memory is associated with the new place.