This is an elementary question about definition, but I do not get answer in texts where I saw the definition (Atiyah-McDonald, Paolo Aluffi).
A ring $B$ is said to be an algebra over a commutative ring $R$ if there is a ring homomorphism from $R$ to $B$ such that image of $R$ is in the center of $B$.
I do not understand the requirement of last condition: "image of $R$ is in center of $B$".
Can one point out why it is required, by illustration of an example, in which a nice theorem fails by removal of this condition? Or can one illustrate the requirement of the last condition in some natural example of algebras?