As an example, mailing lists are likely to have a header like "list-unsubscribe: <mailto:list@host.com?subject=unsubscribe>", which enables email clients like offer easy unsubscribe buttons.
As a note, this can also be a URL, and can also be used to verify humanness in actual spam and not actually unsubscribe, so in practice pretty much only "good known senders with partnerships" get it to appear.
It's basically like you described - an informally specified set of rules the various "big players" in e-mail enforce. There's some consensus about the things you "have" to do to participate in e-mail but it's generally not a black and white "do these things and you'll be fine" situation.