Take One for the Team

What does the idiom “take one for the team” mean?

Definition: Agree to have a negative experience for the greater good of the organization

Example: OK, you can all go home, and I’ll work late. I’m going to take one for the team.