Why do people instinctively say "ow" even when something doesn’t actually hurt?

I noticed that sometimes I say "ow" when I barely bump into something even though it doesn’t actually hurt. I’ve seen other people do it too like when they drop something or get startled. Is this just a weird social habit or does our brain automatically associate certain situations with pain even if there’s none?