Snakes have brains that evolved quite differently from ours. Your nice big neocortex that does all your fancy higher-level processing? Snakes don't have that.
Actually, parrots don't even have one either. Birds never evolved a neocortex. You'd think that might limit their cognitive abilities, right? How are parrots experiencing jealousy without the brain structures we use to experience it? How do they manage to have social lives? And how the heck do magpies pass the self-recognition mirror test without a neocortex to support self-awareness?
Meanwhile, the other archosaur lineage, crocodilians, has managed to include a cerebral cortex in their tiny, tiny brains. Crocodilians do in fact display social behaviors, despite being toothy ancient-looking reptiles. Their brains are ridiculously small compared to their body size, but they manage to do so much.
Birds and reptiles do not have brains like ours. They do not have mammal-like brains. Does this mean they're incabable of higher level processing? Not necessarily.
They do have brain structures homologous to mammalian structures. Their brains are not primitive, they simply have a different way of getting things done.
I wouldn't argue that snakes have warm fuzzy mammal emotions. They're not mammals. It's unscientific, though, to assume they couldn't possibly have emotions because they don't have the brains of social animals. Snakes aren't social in a mammalian way, but what the heck is up with
Thamnophis?
Why are people studying the social lives of rattlesnakes? Their brains may be tiny and unmammalian, but it's unfair to say they're unfeeling instinct-driven machines because of that. We don't actually know.
If the whole self-aware but neocortexless magpie fiasco is any indication, we are still learning how non-mammal brains work.
I think my snakes are pretty dumb and oblivious sometimes, but I do not assume to know what exactly is going on in their heads.