In the face of dragging yourself out of bed for yet another day of expectations and responsibilities, illness on top of it all can seem at times an insurmountable obstacle. How can you be expected to work? You’re sick. It’s not fair.

But if you haven’t shaken off the cold by the time the weekend rolls around, sickness might seem more manageable in the face of a party you were really looking forward to. You suddenly feel like you can power through.

Many of the symptoms we associate with sickness—tiredness, lack of appetite, decreased ability to feel pleasure—are not caused by infection itself, but rather by the immune system’s response to it. And while doctors have traditionally viewed these “sickness behaviors” as unfortunate side effects of disease, some researchers have proposed that they are actually an adaptive response. Reducing activity gives the body more energy to fight infection, so the thinking goes, and when you eat less, that gives fewer nutrients to the bacteria for growth. A 1964 study also suggested that sickness behaviors are motivational—you’re incentivized to rest, so you can recover.

A new study published in Proceedings of the Royal Society Biological Sciences expands on this research, positing that animals are more or less motivated to engage in these sickness behaviors, depending on their social context. Author Patricia C. Lopes of the University of Zurich explains that “because social context is a main determinant of the costs and benefits associated with investment into survival versus reproduction, it should greatly affect the amount of investment in sickness behaviors.” In some contexts, it may make more sense to prioritize a group, or the species as a whole, over your individual health.