Cats are scared by many things, but I believe with cucumbers it’s based on an instinctive fear of snakes. At first glance a cucumber looks like the end of a large snake, a dangerous place to be. “Veterinary behaviorist Dr. Katherine Houpt says that’s unlikely, as cats hunt snakes in the wild.” Yes, but that’s on their own terms. Human beings hunt things too that they wouldn’t want to turn around and see right next to them.
OK, except cats don’t fear snakes. They hunt and kill them.
We had a cat that loved to play with garden snakes. We’d see him in the yard patting the grass (he had big paws - 6-toes) trying to scare one up. That was fine, but he also liked to bring them inside. Not so fine. I don’t like snakes!