Why are reptiles cold-blooded?

Unlike warm-blooded animals, cold-blooded creatures take on the temperature of their surroundings – when it is cold their bodies and blood cool, when they are in the sun their bodies become warm.