One factor to consider is lease promotions by automakers.
Leasing deals offered by automakers often vary depending on time of year, current supply/demand, model closeouts, etc. When automakers want to move lots of cars, they often structure very good leasing deals that substantially lower the effective cost of the car without lowering the sticker price of the car. These deals can be very attractive because they result in huge savings.
The trouble is that it is hard for most people to compare purchasing vs. leasing because most people don't fully under leasing.