Of course, if we assume that the ring have a unit, then there is absolutely no reason not to assume that homomorphism homomorphisms preserve it (or are there books that do that?)
My impression is that there has been a change in the last 40 years or so; algebra texts written in the '60's or earlier mostly did not require ring to be unital, while, say, from the '70's on most of them did. Of course, rings without unit are still very much present in functional analysis (for example, Banach algebras are not assumed to be unital, as many of the standard examples are not). The first edition of Herstein's book is from 1964.
I don't know how much of this is due to Grothendieck's influence. Certainly algebraists now are less conversant with functional analysis than they used to be, due to an inevitable increase in specialization. In the kind of mathematics I practice, units are a fact of life. The only advantage I can see in not assuming the existence of a unit is that ideals become rings, and one can apply theorems about rings; but this is minor, and is more than offset by the conceptual disadvantages of working with the "wrong" category.