It's an issue in enforcing copyright, not trademark. Search guard isn't pretending to be Elastic. They are pretending to have copy rights to the code beyond what the open source license says they have (hence the mention of open source).
Edit: I think you changed your comment a bit, but it's not that elastic couldn't let this one slide, it's that doing so would hurt them in the future. Their code can't be worth much if they just let people violate the license left and right.
I think the commenter above was trying to say that the "you have to enforce it every time or future cases are weaker" applies to protecting trademark rights and not copyrights. (They weren't saying this is a trademark case, they were saying that because this isn't a trademark case,
trademark rules don't apply.)
The "you have to enforce it" thing is about genericized trademarks: I can sell a painkiller under the name "aspirin" because everyone forgot it's a trademark and so there's no argument that there's an intent to cause market confusion with Bayer. But the copious pirated copies of Windows don't let me sell it without licensing it from Microsoft.
Edit: I think you changed your comment a bit, but it's not that elastic couldn't let this one slide, it's that doing so would hurt them in the future. Their code can't be worth much if they just let people violate the license left and right.