Humans get goosebumps as a defence mechanism to look larger and scarier to potential predators.
Goosebumps are a vestigial reflex that was useful when human ancestors were hairier. The reflex causes hair to stand on end, creating a larger silhouette that might intimidate predators. Modern humans have very little body hair, so goosebumps serve no such function. The reflex persists due to evolutionary inertia. Goosebumps are triggered by cold or emotional responses but don't make modern humans look significantly larger.