Love Thy Neighbor

It says in the Torah, “You shall love your neighbor as yourself.” The Talmud (Kesubos 37b) has a very peculiar application of this verse. The Talmud discusses the proper manner of a court-mandated execution. The Talmud observes that there are two ways to perform the execution referred to as “sayef.” How do we know which option to choose? We choose the one that causes less suffering and disfigurement to the condemned man. Why? Because of the above verse.
This application of the verse seems to contradict its conventional interpretation. The Rambam writes: “It is a mitzvah to love every Jew as oneself. Therefore, he is commanded to speak of his praises and be concerned for his possessions as if they were his own.” The Hagahos Maimonis comments that the dictum of the Rambam only applies to someone who is considered your “neighbor.” Who is considered one’s neighbor? An individual who keeps Torah and mitzvos. The Rambam himself writes (Hilchos Rotzeach 13:14) that it is a mitzvah to hate an individual who was warned and nevertheless sinned, if he did not repent.