In Enderton p. 96, the homomorphism theorem implies (I state only the essential): Let $h:\cal{A} \rightarrow {\cal B}$ be an epimorphism (i.e., a surjective homomorphism). For any sentence $\alpha$ not containing the equality symbol: $\vDash_{\cal A} \alpha \text{ iff } \vDash_{\cal B} \alpha$. On the other hand, Lyndon’s Positivity Theorem, as stated, for example by B. Rossman, implies that a sentence $\alpha$ that is not equivalent to a positive sentence (a sentence without the negation symbol), will not be preserved by at the least one epimorphism $h$. This seems to be a contradiction, but it's not. Let $P$ be a predicate symbol in the signature. For $h$ to be a homomorphism in Enderton, it is required on $P$ that $$\langle a_1, \ldots, a_n\rangle \in P^{\cal A} \Leftrightarrow \langle h(a_1), \ldots, h(a_n)\rangle \in P^{\cal B},$$ whereas being a homomorphism in the statement of Lyndon's theorem requires $$\langle a_1, \ldots, a_n\rangle \in P^{\cal A} \Rightarrow \langle h(a_1), \ldots, h(a_n)\rangle \in P^{\cal B}.$$ Moreover, they are not over the same logic. Lyndon's theorem is within FOL without equality as discussed here, whereas Enderton's homomorphism theorem is within FOL with equality. However, this last point is not the key issue, because it's easy to see what's happen with the homomorphism theorem within a logic without equality.
Is there a way to see what's going on here? In which applications the definition of homomorphism used in Enderton is useful? For example, does it have some significance in theory of database where Lyndon's theorem is useful? The proof of the homomorphism theorem in Enderton is very easy. It's not a deep theorem, but it does not mean that it cannot be useful. Lyndon's Positivity theorem is not easy to prove. I haven't gone trough the proof. I don't have any intuition about what's going on.
Note: The definition of homomorphism used in Enderton is the one obtained when you represent predicates as functions that return True or False and use the same criteria on these functions as on any other functions, except that you naturally fix the homomorphism to be the identity function on the shared value True and False. In computer science, seeing a predicate as a function that returns a truth value is very natural. Therefore, it would be surprising that Enderton's definition, which I suspect existed way before Enderton, has no useful applications. Another way, of putting this is that Enderton definition requires that, if the predicate fails in the source, it must also fail in the target, which is a natural requirement.