Why does my Iphone lose battery in cold weather?

I have an Iphone 5 and i usually keep it charging, but when it's like on 70% and i'm outside in 15-40 degree weather, all of a sudden it says that I only have 20% left, than about 1 minute later it says I have 10% left and than 20 seconds later, it dies. This has happened around 5 times and my question is why does my phone do this? And how can I fix it so it doesn't happen anymore?

IPhones can start malfunctioning in cold temperatures. The battery can die faster or the phone can just shut down.

On the Apple iPhone website, Apple suggests that you only use your iPhone in environments between 32F and 95F, since "low- or high-temperature conditions might temporarily shorten battery life or cause the device to alter its behavior to regulate its temperature."

During colder temperatures, you can either turn off the iPhone or keep it in a warmer place.

Gee… Why does any battery lose power in cold weather?