The eyes above them see light. The pits see heat signals. We used to think the pits were for locating warm-blooded victims. It turns out they can do much more. They read a very precise signal.
Animals give off different heat signatures.
Those infrared pits might tell whether the victim is a safe meal or a rattlesnake eater. Mating is serious business for rattlers. They go miles looking for females. They have to fight other males on the way. The fight is a wrestling match, and the loser suffers severe psychological damage.