There are several introductory textbooks which define a ring without any reference to a unity. However, nearly all of the rings one encounters in various branches of mathematics are endowed with a $1$. Thus, I'm wondering if some of you could prove me wrong and show me some examples of rings without unity arising naturally in a mathematical theory.
(Two-sided ideals don't count as an example, because normally, they aren't considered as rings in their own right, but as modules or equivalence classes, allowing you to pass to a quotient ring (with $1$).)
I once thought it was the case that in number theory basically all the relevant rings were commutative with identity. But this is not so! In the theory of automorphic forms and representations, the Hecke algebras which act on representations of various groups (the groups of points of reductive groups over local and global fields, valued in the field, or in the global case, in its completions or its adele ring) are generally non-commutative and do not have multiplicative identities (although there are interesting subalgebras, e.g. the spherical Hecke algebras, which are commutative and do have identities). In the local case, the rings are convolution algebras of locally profinite (meaning totally disconnected and locally compact) groups. Specifically, for $G$ locally profinite, the space $C_c^\infty(G)$ of smooth (meaning locally constant) and compactly supported complex-valued functions is a ring under convolution (for a choice of Haar measure on $G$) and acts on smooth representations of $G$. In fact, smooth representations of $G$ are literally the same as smooth representations of $C_c^\infty(G)$, so it plays the role of the group algebra $\mathbf{C}[G]$ for $G$ finite. But unlike the group algebra, this ring won't usually have a multiplicative identity.