Let's suppose that our rings are commutative (which is the case that is immediately relevant to algebraic geometry).
If $\phi:A \to B$ is a (possibly non-unital) homomorphism, then $e := \phi(1_A)$ is an
idempotent in $B$, and so we get a decomposition $B = eB \times (1-e)B,$
and the map $\phi$ factors as $A \to eB \to B,$ where the first map is unital, and the second map is simply the inclusion, which is the inclusion of a direct factor.
On Specs, we thus get the composite of the map Spec $eB \to $ Spec $A$,
composed with the "map" (this is not necessarily an honest map of schemes, because it corresponds to the possibly non-unital map $e B \to B$)
Spec $B \to$ Spec $eB$, which just vaporizes the open and closed subset Spec $(1-e)B$ of Spec $B$,
and is the identity on the open and closed subset Spec $eB$.
So the upshot is that nothing much new happens in algebraic geometry, except that we allow maps which are only defined on some open and closed subset of a given scheme. Of course,
this is a big except, because these are not honest maps at all (they are simply not defined on some part of their "domain"). There doesn't seem to be any reason to add them into the mix, which is surely one reason why this generalized notion of homomorphism is not used much in practice.
P.S. One could argue another way, beginning with geometry, and passing to algebra by remembering that rings are rings of functions. If we have a map $\phi:X \to Y$ of spaces
(of some type, e.g. affine schemes, or anything else), then surely the constant function 1 on $Y$ will pull-back to the constant function 1 on $X$. Thus the induced homomorphism on rings of functions will have to be unital, and so one simply has no cause to consider non-unital homomorphisms in the geometric setting.
P.P.S. The argument in the first paragraph shows that allowing non-unital homomorphisms in the category of commutative rings is the same as adding, in addition to unital homomorphisms, homomorphisms of the form $B_1 \to B_1\times B_2,$ given by $b_1\mapsto (b_1,0),$ for any pair of commutative rings $B_1$ and $B_2$. So it's not really a very exciting change from the purely algebraic point of view either.