My assumption is that the snake moves and acts as though its tail is its head, making a potential predator with poor vision wary about attacking either end. Interesting evolutionary possibility, if true.
Without further information, I’d agree that this is likely a folk belief about a real species or subspecies. The Chinese is 率然 (shuàirán in pinyin), which the online MDBG dictionary gives as “hastily, rashly, suddenly” and individually as “rash, hasty” + “pledge, promise” so there may be a pun involved. I don’t speak Chinese, much less Classical Chinese, so I don’t know. Those mountains seem to be in Zhejiang Province, and I imagine you could find a list of snakes native to the region.