It signals danger and performs a mechanical avoidance procedure. You react to it by feeling a protective emotion.
To know if it suffers, first you have to understand what suffering is, in scientific terms, and make sure you detach your builtin empathy from an actual process, because it’s only yours own.