Bowlby's attachment theory was influenced by evolutionary theory and ethologists like Lorenz who studied imprinting. Bowlby believed that early ancestors evolved an attachment system to help infants form strong bonds with caregivers for protection, which ensured their survival. This attachment system causes infants to engage in behaviors like babbling and crying to attract caregivers and learn important survival skills from them.