The same muscles (arectores pilorum) that enable a cat to do this:
also enable us to do this:
And in both cats and ourselves, the same stimuli cause goosebumps/hair erection: cold and fear.
But of course goosebumps aren’t of any use to us. They don’t keep us warm, nor do they make us look bigger and fearsome, like the kitteh above. They’re evolutionary leftovers, evidence of our common ancestry with other mammals.