Gender as a role?

Gender is typically treated as  “role” in society. Unlike other roles, such as “student” or “postal carrier”, the role of gender is present in all aspects of life. Why is this the case? If gender is truly limited to a social role, shouldn’t it be something that only applies in certain locations and certain situations?