He was probably just hungry and noticed your movement. When feeding day comes around over here some of my snakes are already in their "striking pose" when I open their tubs, regardless if there are rodents in the vicinity.